I got it: tmpJnts = ls (sl = 1) print tmpJnts[1].name() for jnt in tmpJnts: print jnt.name()
On May 11, 4:29 pm, PixelMuncher <[email protected]> wrote: > Hi all: > I'm writing a joint locking script for weight painting. > > If I use maya.cmds to select assign the joints: > tmpJnts2Unlock = cmds.ls (sl = 1) > and then print w/this > print (jnt.encode("ascii","ignore")+" is unlocked.") > I get: > joint1 is unlocked. > joint2 is unlocked. > joint3 is unlocked. > > However if I select the joints w/PyMEL: > tmpJnts2Unlock = ls (sl = 1) > and print w/above print statement, I get an error: > AttributeError: nt.Joint(u'joint3') has no attribute or method named > 'encode' # > > Is there a method to format PyMEL output to ascii? > Thanks. > > --http://groups.google.com/group/python_inside_maya -- http://groups.google.com/group/python_inside_maya
