Hi!
I'm trying to change the UV Set of a script generated shell either per script or when I apply the material. I can't get it work. I've loaded in the UVSet on the base figure and saved it as a UV Asset. I can change the UV Set manually in the base figure and in the generated shell - so this works fine. But somehow it's not possible to change this property via script. And it seems like it's also not saved in the material preset.
Here is the part of my script (I can succesfully change other values of the material):
Scene.findNodeByLabel("MyShell").select(true);
var node = Scene.getPrimarySelection();
var nodeShape = node.getObject().getCurrentShape();
var numMats = nodeShape.getNumMaterials();
///////////////change uv set
for (var mats = 0; mats < numMats; mats++)
{
var curMat = nodeShape.getMaterial(mats);
var UVSet= curMat.findProperty("UV Set");
UVSet.setValue("MyUV");
}
I hope someone can help me.
Thank you very much!