Hi everyone,
I’m currently trying to build a *tween(blend) tool that works in world 
space*.

My approach is like this:
If I have an object with keys on *frame 5* and *frame 10*, and I want to 
create a tween on *frame 7*, I do the following:

   - 
   
   I get the *world matrix* of the object at frame 5 and frame 10.
   - 
   
   I also get the *parent inverse matrix* of the object at frame 7 (the 
   frame where I want to apply the tween).
   - 
   
   I decompose the world matrices from frame 5 and 10.
   - 
   
   I *lerp* the translation and scale, and *slerp* the rotation.
   - 
   
   Then I rebuild the matrix from the interpolated values.
   - 
   
   I multiply this result by the parent inverse matrix.
   - 
   
   Finally, I decompose the final matrix and apply those values to the 
   object at frame 7.
   
The problem is that the values I get are *always wrong*, and I can’t figure 
out why.
So I’m not sure if my *approach is incorrect*, or if I’m missing something 
important.

If anyone is familiar with this and is willing to *look at the code with me*, 
I’d really appreciate the help.
Thanks a lot 🙏

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/python_inside_maya/fa6ab7f7-6fe7-4f69-b311-aee6b4c01442n%40googlegroups.com.

Reply via email to