diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2022-05-25 14:00:18 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-06-07 10:53:11 +0300 |
commit | 9ccc21dde372d57fa841a494d72527b30d2948d2 (patch) | |
tree | bef0482f2522fcb7dc61a2a7ffa59e6e1876a6ce /source/blender/editors/include | |
parent | 4580c18c56f62b1e1dbe35dd50925a21db36e506 (diff) |
VSE preview transform autokeying improvements
NOTE: this patch originated in T98015 which was split into multiple
reports. While it could be split into multiple patches these are very
much related so keeping as one for now
This patch fixes the following issues:
[1] autokeying transforms in preview only creates keyframes if there is
an FCurve already
[2] autokeying transforms in preview only creates keyframes for
rotation/scale if rotating/scaling around cursor (should keyframe
position as well)
[3] autokeying transforms in preview does not work during animation
playback
For [1], a param was added to `ED_autokeyframe_property` which can tweak
its default behavior of only creating keyframes on already keyed
properties (which was fine because this is mostly called from buttons
where this behavior is desired). Callers such as gizmos (or the VSE in
our case) can use this additional param so that keyframes are also
created on "not-yet-keyframed" properties.
For [2], the pivot is checked and position properties also keyed if
necessary (which is also consistent with the way objects are keyed in
the 3DView)
For [3], `animrecord_check_state` was changed to be able to work on
scenes as well and the transform system in the VSE preview was made
aware of the screen's `animtimer`.
NOTE: there are still things to be improved for keyframing in the VSE,
the most obvious is probably a `keyframe_insert` operator (with
keyingsets)
Fixes T98429, T98430, T98431
Maniphest Tasks: T98015, T98431, T98430, T98429
Differential Revision: https://developer.blender.org/D15047
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_keyframing.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index 8c0147612fb..5f172dab969 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -658,15 +658,20 @@ bool ED_autokeyframe_pchan(struct bContext *C, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks); + /** - * Use for auto-key-framing from the UI. + * Use for auto-key-framing + * \param only_if_property_keyed: if true, auto-key-framing only creates keyframes on already keyed + * properties. This is by design when using buttons. For other callers such as gizmos or VSE preview + * transform, creating new animation/keyframes also on non-keyed properties is desired. */ bool ED_autokeyframe_property(struct bContext *C, struct Scene *scene, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, - float cfra); + float cfra, + bool only_if_property_keyed); /* Names for builtin keying sets so we don't confuse these with labels/text, * defined in python script: `keyingsets_builtins.py`. */ |