preserve uvs

preserve uvs

stuzzz
Collaborator Collaborator
1,331 Views
4 Replies
Message 1 of 5

preserve uvs

stuzzz
Collaborator
Collaborator

hi,

 

Is there any function of snippets for preserving the UVs while translating points?

Thanks.

0 Likes
Accepted solutions (1)
1,332 Views
4 Replies
Replies (4)
Message 2 of 5

osidedan
Advocate
Advocate

hello!

If you're using the xform command to move verticies, there is a preseveUV flag. 

for example (in python):

# Moves a selected vertex to the world origin while preserving UV space
import maya.cmds as cmds
sel = cmds.ls(sl=True)[0]
cmds.xform(sel, t=(0,0,0), preserveUV=True)


Hope that helps!

0 Likes
Message 3 of 5

stuzzz
Collaborator
Collaborator

Interesting. I did not have a look at the Maya commands since I use the c++ api.

I'd like to avoid using xform. 

Do you know if there is a equivalent api function for this purpose?

 

Thanks 

0 Likes
Message 4 of 5

osidedan
Advocate
Advocate
Accepted solution

Oh if you're doing api/plug-in stuff, then that is definitely outside of my knowledge base. Someone else will need to chime in on that. I hope you get it figured out though!

0 Likes
Message 5 of 5

The-Digital-Shaman
Advocate
Advocate

What's wrong about xform?

0 Likes