ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

Exception calling getAngleX() on a Joint #248

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.
When I call the method getAngleX (or Y, or Z) from a nodetype Joint I get an 
exception error. All the other methods work fine on this node.

What Version of Maya are you using?
Maya 2012 64bit

On what operating system? (be as specific as possible and include service 
packs, 64bit vs 32bit, etc)
Windows XP Professional 64bit (2003 version), service pack 2

What Version of PyMEL are you using?
PyMEL v1.0.3 (the one inside Maya)

What is the expected output? What do you see instead?
The expected output is a float value. Instead, I get this:
# Error: 'float' object is unsubscriptable
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File "C:\Program 
Files\Autodesk\Maya2012\Python\lib\site-packages\pymel\internal\factories.py", 
line 1019, in wrappedMelFunc
#     return returnFunc( inFunc( self, **kwargs ) )
#   File "C:\Program 
Files\Autodesk\Maya2012\Python\lib\site-packages\pymel\internal\factories.py", 
line 2541, in <lambda>
#     returnFunc = lambda x: x[0]
# TypeError: 'float' object is unsubscriptable # 

If possible, provide a few lines of code to reproduce the problem. It helps
us if your code will reproduce the problem from a new scene.
joint = 'joint_name'
joint = pm.ls(joint)[0]
pm.select(joint)
angle = joint.getAngleZ()

Does maya.cmds exhibit the same problem?
no, in maya.cmds the command cmd.joint('joint_name',q=1,ax=1) works fine.

Please provide any additional information below.

Original issue reported on code.google.com by doruc...@gmail.com on 21 Jun 2011 at 2:22

GoogleCodeExporter commented 9 years ago
The same problem occured for PyMel v1.0.3, Maya 2013 64bit

Original comment by guo7...@gmail.com on 12 Apr 2013 at 3:54

GoogleCodeExporter commented 9 years ago
fixed in de18f1d9fceae9199c7684c1a36959ad1f76867b on github

Original comment by elron...@gmail.com on 16 Apr 2013 at 10:58