Issue with World Space Tween Calculation

17 views
Skip to first unread message

Frame

unread,
Dec 22, 2025, 6:45:10 AM (21 hours ago) Dec 22
to Python Programming for Autodesk Maya

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.

  • 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 🙏

Reply all
Reply to author
Forward
0 new messages