Hi all,
I’m looking for a way to know if one of blender’s internal operators executed. Specifically, I want to know if an object/bone has been scaled, rotated, or moved.
Here’s what I am really looking for: creating a smart auto key framing tool.
When animating using blender’s auto key framing, when an object/bone is moved, scaled, or rotated, blender automatically inserts key frames for the loc/rot/scale. That’s 9 key frames (if using euler rotations, 10 keys if quaternion rotation) inserted in the dopesheet on 9 channels, 3 loc, 3 rot, 3 scale channels. I’d like to reduce the number of key frames added from 9 (or 10) down to just the number of key frames needed.
For example; animating the hands of a clock, you’d have 2 hands that can be rotated on their x-axis only. The location, scale, and y & z rotations are locked and can’t be changed or animated. Blender’s auto keying will insert key frames for every channel, so you get 9 key frames when only changing the x rotation, or only needing 1 key frame.
It’s not so much a big deal when working with the dopesheet, but when it comes to tweaking animation curves in the f-curve editor, you deal with 9 animation curves when only 1 channel (or curve) has changed, the x-axis.
I’d like a tool that only inserts key frames on channels that have changed. Best way to do that, as I see it, is to find out when these operators execute:
bpy.ops.transform.translate()
bpy.ops.transform.rotate()
bpy.ops.transform.resize()
Then insert key frames only on channels that aren’t locked down.
I’m sure I can write an operator to insert the key frames for channels that aren’t locked, but what I can’t figure out is how to execute the operator… How would I know when an object/bone has changed?
Thanks,
Randy