Using Amorano's code, I was able to finish my joint weight locking
tool with PyMEL code.

For me, the biggest lesson here has been referencing objects as
strings.
What I still find confusing is:

print tmpJnts
[nt.Joint(u'joint1'), nt.Joint(u'joint2'), nt.Joint(u'joint3'),
nt.Joint(u'joint4'), nt.Joint(u'joint5')] #List of objects
print tmpJnts[0]
#joint1 - This is the name of the joint, but it is still an object,
not a string

Why doesn't:
print tmpJnts[0]
return:
nt.Joint(u'joint1')

Paul:
I was able to cast a string as an object using PyNode, but "Transform"
and "Joint" threw errors:
print PyNode( jntSplitList[0]).name() # Works
print Joint( jntSplitList[0]).name()
# Error: NameError: file <maya console> line 1: name 'Joint' is not
defined #

Thanks again for all the help.

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to