Hi all
I am writing a script in Python to convert Maya File Nodes to aiImage Nodes.
I need to use aiImage nodes because there are certain UV modifications you can do with them that the default File Node can not.
One thing I can not seem to figure out is how to transfer the correct UVset linking from a default Maya File node to an aiImage Node. And i can not make it work even by hand.
Can anyone help me figure out how o do it?
I see that in an aiImage Node there is a UVSet slot, where you can write down a string with the UV set, but I have tried inserting the name of the UVset I want (uvSet1, from the object pCubeShape2) and it just does not work, it only renders the default 1 . I tried with and without "", with and without '', I tried writing
pCubeShape2.uvSet[2].uvSetName
pCubeShape2.uvSet[2].uvSet1
uvSet1
'pCubeShape2.uvSet[2].uvSetName'
'pCubeShape2.uvSet[2].uvSet1'
'uvSet1'
"pCubeShape2.uvSet[2].uvSetName"
"pCubeShape2.uvSet[2].uvSet1"
"uvSet1"
Nothing works.
With the Maya File Node it works perfectly using the Windows-->Relationship Editors-->UVLinking-->UV-Centric window, but these commands do not seem to work for the aiImage.
I am probably making some really obvious mistake here. Any idea on what is the correct writing?
Also, what to do if the material is applied to multiple objects? Can you write a list/array of sets?
Thanks
P