Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyNode throws an exception for motion path handle points #431

Open
zewt opened this issue Jun 26, 2020 · 0 comments
Open

PyNode throws an exception for motion path handle points #431

zewt opened this issue Jun 26, 2020 · 0 comments

Comments

@zewt
Copy link

zewt commented Jun 26, 2020

Creating PyNodes for motion path points throws an exception:

# Traceback (most recent call last):
#   File "<maya console>", line 4, in <module>
#   File "C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\core\general.py", line 1255, in ls
#     return map(PyNode, res)
#   File "C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\core\general.py", line 2456, in __new__
#     pymelType, obj = _getPymelType(argObj, name)
#   File "C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\core\general.py", line 134, in _getPymelType
#     pymelType = _getPymelTypeFromObject(obj, name)
#   File "C:\Program Files\Autodesk\Maya2020\Python\lib\site-packages\pymel\core\general.py", line 75, in _getPymelTypeFromObject
#     raise RuntimeError('Could not determine pymel type for object of type %s' % obj.apiTypeStr())
# RuntimeError: Could not determine pymel type for object of type # 

I'm not trying to do anything specific to these nodes, but this causes errors in generic code. For example, if I save the selection to reselect it later:

sel = pm.ls(sl=True)
try:
    ...
finally:
    pm.select(sel, ne=True)

it throws an exception if the user has a motion path point selected.

To reproduce, just put a couple keyframes on a transform, create a motion trail, and select one of the motion trail points in the viewport (or "select motionTrail1Handle.point[0]"), then run pm.ls(sl=True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant