this is more of a general Maya scripting question than python specific but I thought I'd hear you out anyway.
I'm doing an IK-FK matching tool with the IK and FK controllers having different orientation, rotation space and rotation order.. all that stuff...and now I need to match them up so they are oriented the same in worldspace.
Initially I've been doing it with an orientConstraint where I apply a certain offset value to match up the two controllers, read the rotation, delete the constraint and apply the rotation values.
This however is not always working as the constraint will fail if you have other connections messing around with your rotations (in this case usually another constraint with the weighting set to 0)
For that reason I want to do the orientation matching without use of constraints and my immediate though was a simply xform rotation query in worldspace on my master ctrl and apply that rotation + the offset to my target ctrl in worldspace as well but it's not working.
I get offsets that vary depending on initial rotation and I can't find my way around in why that should happen.. It's very likely some rotationOrder that messing with me but I haven't been able to solve it yet.
Does anyone have a method for matching rotations like that either by faking the math of an orientConstraint or by taking a completely different route?
Cheers and thanks in advance.
JAKOB WELNER
_____________
Animator | R&D
jakob.welner.dk