diff options
Diffstat (limited to 'archipack')
-rw-r--r-- | archipack/archipack_thumbs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py index ce6d0b48..730cc8a5 100644 --- a/archipack/archipack_thumbs.py +++ b/archipack/archipack_thumbs.py @@ -77,7 +77,10 @@ def get_center(o): def apply_simple_material(o, name, color): m = bpy.data.materials.new(name) m.use_nodes = True - m.node_tree.nodes[1].inputs[0].default_value = color + for node in m.node_tree.nodes: + if node.bl_idname == "ShaderNodeBsdfPrincipled": + node.inputs[0].default_value = color + break o.data.materials.append(m) |