For now i can control mapping by name of material but the problem is , all in this object material use mapping , exist a way to get all mapping node inside at material and controll all with my rot_var? this object can 1 to multiple materials slots
i think but not work:
ob = context.object
rot_var = ###my variable(0 to 360)
for s in ob.material_slots:
if s.material.use_nodes:
for n in s.material.node_tree.nodes:
mapping = n.get("Mapping")
mapping.rotation[2] = radians(rot_var)
Edit: i find solution for Mapping:
for slots in ob.material_slots:
for nodes in slots.material.node_tree.nodes:
if nodes.type == 'MAPPING':
nodes.rotation[2] = radians(rot_var)
but inside i have 2 nodes "MixRGB" i not have idea to get because same name of nodes and not have idea about name of MixRgb