Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Reversing a code?
  RSS 2.0 ATOM  

Reversing a code?
Rate this thread
 
33824
 
Permlink of this thread   Subscribe to this thread
avatar
  • Total Posts: 2
  • Joined: 07 August 2009 10:20 PM

yea so i was on another forum asking how to get a hud display reading of x,y,z for selected vertices, polygons, and objects.  so some guy gave me a code for python…

import maya.cmds as mc

sel = mc.ls(sl = True)

for node in sel:
vertPos = mc.xform(node, ws=True, q=True, t=True)
print vertPos

this code moves all the vertices when i try to move the selected vertice, so i just need to know how to reverse this.

also my original question would be nice to know as well (the hud display reading...etc..)

thank you :)

edit: this is on maya 2009



Replies: 1
/userdata/avatar/avatar_1601.png

mel.eval(’invertSelection’) ?

Author: rasto

Replied: 21 March 2010 12:42 PM  
avatar
  • THNKR
  • Posted: 21 March 2010 03:31 PM

The example you posted does not move anything; it just prints the xyz position of the whatever is selected.

If you want to learn how to make a head-up display: I have an example at http://thnkr.com/wiki/index.php?title=Bounding_box_heads_up_display



Replies: 0




   
  Settings Choose Theme color: