Where are Changes To Object Transforms Stored / Updated?

Hey there!

I’m working on a small patch to improve the Only Insert Needed feature of the auto-keyframing function. It’s both to improve the outcome of that feature as well as serve as another exercise to become further acquainted with the source code. Specifically I’m trying to add the following functionality:

  • Only insert keyframes on transform values that have changed between the start and end of the transform. E.G. If you move a cube only along the Z axis, it should only store keyframes on the Z axis. Currently it stores keyframes on the Y and X axis even though those values haven’t changed each transform.

I have located the function that is fired when this feature is turned on (new_key_needed). So I can certainly work on it now that I know where it is. However, I don’t know where transforms are stored / handled in C. Specifically where the initial position of the object, and the final position of the object, before and after the transform.

I’ve read a bit about how notifiers and listeners work from the 2.5 wiki. Is that a route to get the data to new_key_needed? It seems like all of the auto keyframing functions get fired after the transformation is complete.

I’m going to keep digging. In the meantime does anyone have any hints / thoughts?