Setting UVs on a material
meipe
Posts: 101
I was wondering... is there a way to set UVs on a material by its name? Setting it by its index works:
var baseUV=myMaterial.findPropertyByLabel("UV Set")
baseUV.setValue(2);
But on different figures, the UV map matching such index may not be the same...
Comments
This may help: https://www.daz3d.com/forums/discussion/comment/938319/#Comment_938319
Thanks a lot! :)
So, the solution is:
1-Get the name of source UV set:
2-Iterate in the destination UV set, getting one by one the UV sets names, checking for a match and grabbing its index number;
3- if there is a match, setting the destination UV set: