You must update pymel to newest version. Clone it form git repo.

2011/12/3 张宇 <[email protected]>

> Please ignore my paste fault, I copied the history include the action in
> the scene
>
>
> 2011/12/3 Kamil Hepner <[email protected]>
>
>> Hi!
>>
>>
>> import pymel.core as pm
>> node = pm.createNode('animCurveTA')
>> select -cl ; # THIS IS MEL COMMAND! not python, should be
>> pm.select(clear=True)
>> node.selecte() # Should be node.select()
>>
>> Cya!
>>
>> 2011/12/3 张宇 <[email protected]>
>>
>>>  I want to add some keys for a anim node
>>> here is the method of the addKeys
>>>
>>>> addKeys(self, time, values, tangentInType='linear',
>>>> tangentOutType='linear', unit=None) method of
>>>> pymel.core.nodetypes.AnimCurveTA instance
>>>
>>> So i did this
>>>
>>>> import pymel.core as pm
>>>> node = pm.createNode('animCurveTA')
>>>> select -cl ;
>>>> node.selecte()
>>>> # Error: nt.AnimCurveTA(u'animCurveTA1') has no attribute or method
>>>> named 'selecte'
>>>> # Traceback (most recent call last):
>>>> # File "<maya console>", line 1, in <module>
>>>> # File
>>>> "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel-1.0.0-py2.6.egg/pymel/core/nodetypes.py",
>>>> line 321, in __getattr__
>>>> # raise AttributeError,"%r has no attribute or method named '%s'" %
>>>> (self, attr)
>>>> # AttributeError: nt.AnimCurveTA(u'animCurveTA1') has no attribute or
>>>> method named 'selecte' #
>>>
>>> Ok, i changed the time and value to a list, but there is a new error,
>>>
>>>> node.addKeys([3,4], [5])
>>>>
>>>> # Error: 'module' object has no attribute 'apiClassInfo'
>>>>
>>>> # Traceback (most recent call last):
>>>>
>>>> # File "<maya console>", line 1, in <module>
>>>>
>>>> # File
>>>> "/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/pymel-1.0.0-py2.6.egg/pymel/core/nodetypes.py",
>>>> line 3006, in addKeys
>>>>
>>>> #
>>>> _api.apiClassInfo['MFnAnimCurve']['enums']['TangentType']['values'].getIndex('kTangent'+tangentInType.capitalize()),
>>>>
>>>> # AttributeError: 'module' object has no attribute 'apiClassInfo' #
>>>>
>>> Who know why?
>>>
>>> --
>>> http://thatboy.me
>>>
>>>
>>>  --
>>> view archives: http://groups.google.com/group/python_inside_maya
>>> change your subscription settings:
>>> http://groups.google.com/group/python_inside_maya/subscribe
>>>
>>
>>  --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>
>
> --
> http://thatboy.me
>
>
>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to