How to access and edit Mapping Node via python? I need to access Mapping Node via python to edit Location\Rotation\Scale



mat = bpy.data.materials['MaterialName']
mat_nodes = mat.node_tree.nodes
map = mat_nodes['Mapping']

map.inputs[0]
print(map.inputs[0])
**&lt;bpy_struct, NodeSocketVector("Vector")&gt;**


But there are no other inputs, and I have noidea what [0] input does

PS I know that my node named Cracks_Mapping

Found an answer here :
Access Mapping node with python
bpy.data.materials['Material'].node_tree.nodes['Cracks_Mapping'].rotation[2] = some value


That's how you do it. input[0] is the only input of the node, the Vector. The 0 is the index. For example rotation has 3 index, 0, 1, and 2 for X, Y, and Z. Knowing that, if you assign a value to .rotation[2] like in my code example you'll modify Z rotation value of the mapping node. It's pretty straightforward really.