Skip to main content
added 215 characters in body
Source Link
Benus
  • 3.4k
  • 6
  • 21

"should contain 4 items, not 3"

bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)

4th item would be Alpha in this case. Above line would be Black with opacity of 1.

This, however, would be setting the Viewport Colour. To set the node base colour. Use this :

bpy.data.materials["chasis"].node_tree.nodes["Principled BSDF"].inputs[0].default_value = (0, 0, 0, 1)

"should contain 4 items, not 3"

bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)

4th item would be Alpha in this case. Above line would be Black with opacity of 1.

"should contain 4 items, not 3"

bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)

4th item would be Alpha in this case. Above line would be Black with opacity of 1.

This, however, would be setting the Viewport Colour. To set the node base colour. Use this :

bpy.data.materials["chasis"].node_tree.nodes["Principled BSDF"].inputs[0].default_value = (0, 0, 0, 1)

Source Link
Benus
  • 3.4k
  • 6
  • 21

"should contain 4 items, not 3"

bpy.data.materials["chasis"].diffuse_color = (0, 0, 0, 1)

4th item would be Alpha in this case. Above line would be Black with opacity of 1.