Hello, I’ve a basic problem where my code does not work if Blender is not set in English
This is the piece of code that I think it’s broken:
mat1 = bpy.data.materials.get("CustomMaterial1")
bsdf1 = mat1.node_tree.nodes.get("Principled BSDF")
if bsdf1:
bsdf1.inputs[0].default_value = (color1[0], color1[1], color1[2], 1)
bsdf1.inputs[2].default_value = 1.0
I’ve already substituted the names of the “Base colour” and “Roughness” channels by calling input[1] and input [2] instead, and this works, but what about the “Principled BSDF” name of the node? how can I call it by type instead?
Thanks in advance, Riccardo