Blender 5.0 - avoid using deprecated use_nodes

This commit is contained in:
Andrej730
2025-11-04 14:23:55 +05:00
parent 3bdfbebc02
commit d2126e5929
12 changed files with 58 additions and 30 deletions
@@ -176,7 +176,8 @@ def import_ifc(filename, use_names, process_relations, blender_booleans):
mat.blend_method = "HASHED"
mat.use_screen_refraction = True
mat.refraction_depth = 0.1
mat.use_nodes = True
if bpy.app.version >= (5, 0, 0):
mat.use_nodes = True
bsdf = next(n for n in mat.node_tree.nodes if n.type == "BSDF_PRINCIPLED")
bsdf.inputs[15].default_value = v
else: