Hello, have a few questions:
Is there a way to get the inputs index of the node connected to the output of a given node? For example, if I have a normalMap node connected to Principled BSDF, I can get Principled BSDF by
for mat in bpy.data.materials:
for to_node_link in mat.node_tree.nodes[‘Normal Map’].outputs.links:
to_node = to_node_link.to_node
But is there a way to find where’s the link connected to in Principled BSDF inputs ?
- What’s the equivalent python code for Shift+C, if it can be done without opening Blender?