Skip to content

Commit

Permalink
Material node check
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan committed Nov 13, 2023
1 parent e2303dc commit cbe65cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion speckle_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ def set_filename(fileName):
for mat in bpy.data.materials:
COLOR = (1.0, 1.0, 1.0, 1.0)
mat.diffuse_color = COLOR

if not mat.node_tree:
continue
inputs = mat.node_tree.nodes["Principled BSDF"].inputs
inputs["Base Color"].default_value = COLOR


# Convert all rooms as lights
traversal_func = get_default_traversal_func(can_convert_to_native)
rooms = [x.current for x in traversal_func.traverse(root_object) if x.current.speckle_type == "Objects.BuiltElements.Room"]
Expand Down

0 comments on commit cbe65cc

Please sign in to comment.