|
Hello out there!
I’m currently writing a plugin for Maya with C++, manipulating joints within a scene. Everything works fine… until now.
I am working with the MFnIkJoint class editing the joint information. Just like setName, setRotateOrientation etc. work just fine! Even setting limits works now.
Using the setDegreesOfFreedom function sets the checkmarks on the DOF information for the joint correctly, but they don’t have ANY effect until the user MANUALLY clicks at least one of them by himself!
So for example if a joint is being modified by my plugin that previously had DOF of x, y and z and NOW only should have x, the user can see the change in the attributes, because y and z loose their checkmark. But he can still rotate the joint to EACH direction. As soon as he clicks on one of x, y or z once or twice (so it has the same state like being set by the plugin), the joint obeys the DOF. Before it doesn’t.
My question is:
What am I doing wrong here?! And how to solve this issue? I’m tired of using MEL within my C++-Code, but if this would help…
Or am I just using the setDegreesOfFreedom function wrong?! I have to give 3 booleans. Do I need to update or call anything else afterwards so that the changes take effect?!
I’m thankful for any help I get. :-)
Yours,
Ray
|