Maya 2018.2: allUVSets vs UV Set Editor, which result is correct?

Maya 2018.2: allUVSets vs UV Set Editor, which result is correct?

g2m.agent
Collaborator Collaborator
723 Views
1 Reply
Message 1 of 2

Maya 2018.2: allUVSets vs UV Set Editor, which result is correct?

g2m.agent
Collaborator
Collaborator

i wrote a script that renamed the first UV of the UV Sets to "map1".

 

import maya.cmds as cmds
sels = cmds.ls( selection=True )
for object in sels:
    cmds.select(object)
    allUVSets = cmds.polyUVSet(query=True, allUVSets=True)
    
    if allUVSets[0]!="map1":
        if "map1" in allUVSets:
            cmds.polyUVSet(delete=True, uvSet='map1')
        cmds.polyUVSet(rename=True, newUVSet='map1', uvSet=allUVSets[0])

today i noticed that its result is different from "UV Set Editor".

 

this is script and Attribute Editor result:

2018-01-08_13-43-10s.png2018-01-08_13-43-1s0.png

 

this is UV Set Editor result:

* i click "Update" many times, and nothing change.

2018-01-08_13-43-10a.png

 

which result is correct?

 

**edit: i upload my file.

0 Likes
Accepted solutions (1)
724 Views
1 Reply
Reply (1)
Message 2 of 2

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

The script works fine here and seems to be OK.

 

The connection of your first uvset on your meshes instead looks broken (also check with Relationship Editor).

- Just rename "UVChannel_1" and "map1" becomes accessible again, like with every other action related to UV's.

- Also deleting unknown nodes + saving as ASCII corrected it for me.

 

It seems to be a problem related to your scene (maybe plug-in nodes?).

 

If you think it's caused by the script please upload a scene-file before running the script.

0 Likes