Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-10-12 17:55:46 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-10-12 18:00:11 +0300
commit5e6c7de3e918f7ecbf4ea898f6e5b8a2373ad17e (patch)
tree0011f9a4c38186e1fea9b325e843a9b23d8645e6 /source/blender/makesdna
parent0d3e192660bfa231aacf80d3e5a3d750155798ea (diff)
Animation: enforce that the active keyframe is always selected
Check selection state in `BKE_fcurve_active_keyframe_index()`, and only return the active keyframe index when that keyframe is actually selected. This is now also asserted in the `BKE_fcurve_active_keyframe_set()` function, which is now also used when inserting a keyframe.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index f17d8b84790..1a74166da31 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -593,6 +593,9 @@ typedef struct FCurve {
/**
* Index of active keyframe in #bezt for numerical editing in the interface. A value of
* #FCURVE_ACTIVE_KEYFRAME_NONE indicates that the FCurve has no active keyframe.
+ *
+ * Do not access directly, use #BKE_fcurve_active_keyframe_index() and
+ * #BKE_fcurve_active_keyframe_set() instead.
*/
int active_keyframe_index;