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.
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?