Hi all, I need some help with getting animation curves using OpenMaya.

I have 3 cases in which nodes in scene will be generated:

   - Manual keyed
   - By constrains
   - Use of anim layers

In my code, I was able to get the first scenario working. And so I thought 
it will work for the other 2 but turns out it is not.
Here is my code: https://pastebin.com/raw/YKupFfsW and I have attached a 
scene file for use.

In the code, if you un-comment `scenario1` and comment `scenario2`, I will 
get the following error:
# Error: (kInvalidParameter): Object is incompatible with this method
# Traceback (most recent call last):
#   File "<maya console>", line 66, in <module>
#   File "<maya console>", line 27, in rotation_check
# RuntimeError: (kInvalidParameter): Object is incompatible with this 
method # 

Whereas if you comment out `scenario1` and uncomment `scenario2`, a 
different error will be spawn if the specified node inputted is either 
["test_animLayer"] or ["test_constrained"]:
# Error: (kFailure): Object does not exist
# Traceback (most recent call last):
#   File "<maya console>", line 61, in <module>
#   File "<maya console>", line 42, in rotation_check
# RuntimeError: (kFailure): Object does not exist # 


1. My question here would be, why does the error between scenario differs 
(so much) at different line? I would have expected them to error out at 
line 27 in scenario 1, since "test_animLayer" and "test_constrained" are in 
the seelction...

2. Given in the above cases, is there an OpenMaya command that I can use to 
effectively determine either of the cases has an animation curve?


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/02f996f0-ea9d-4f6d-b51d-90e8c804b7cf%40googlegroups.com.

Attachment: rotational_test.ma
Description: Binary data

Reply via email to