polyNormalizeUV not working on multiple selected objecsts

polyNormalizeUV not working on multiple selected objecsts

Craig_Lamorte
Advocate Advocate
442 Views
1 Reply
Message 1 of 2

polyNormalizeUV not working on multiple selected objecsts

Craig_Lamorte
Advocate
Advocate

Hi,

 

If I select multiple meshes, or select UVs belonging to different meshes, and I go to Modify > Normalize in the UV editor, then it works just fine.  But if I do the same selection and run this command

pm.polyNormalizeUV(selection, nt=1, pa=False)

Then it throws this error # Error: RuntimeError: file C:\Program Files\Autodesk\Maya2017\Python\lib\site-packages\pymel\internal\pmcmds.py line 134: Doesn't work with multiple objects selected. # 

 

I even tried replicating exactly what the command and flags displayed when it echoed it the script editor but still didnt work.  Why does it work in the menus but not in code?

 

thanks

0 Likes
443 Views
1 Reply
Reply (1)
Message 2 of 2

stuzzz
Collaborator
Collaborator

yo buddy,

it works with the menu because the menus calls a global function "polyForceUVCallback" from the "performPolyForceUVArgList.mel" file. It does not call polyNormalizeUV directly.

 

this global proc "polyForceUVCallback" actually make a batch operation using the "polyNormalizeUV" command several times if needed.

 

bellow a capture of my script editor when apply the tool on 3 selected objects ['pCube1','pCube2','pCube3']:

grabScreen_096141648.jpg

0 Likes