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:
authorHans Goudey <HooglyBoogly>2020-10-07 13:46:58 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-10-07 13:46:58 +0300
commite584bc320a9cf6be7a16fc159bb26b5ced5572fb (patch)
tree6275e5310ce070d469095dc79da26340423a66f8 /source/blender/makesdna/DNA_anim_types.h
parent4bb15c8eecbf8186a8948ced9349d54c1a8c5e33 (diff)
Fix T76595: Indicate the Active Keyframe in Graph Editortemp-fcurve-active-keyframe-D7737
Currently there is a panel that says "Active Keyframe" for numerically editing one keyframe's values, but in the code there is no concept of the "active keyframe." This patch adds an "active keyframe index" to each FCurve, and displays it with a theme color for the active vertex (which didn't exist before) if the FCurve is active. {F8536092 size=full} The active keyframe is not currently set for select operations other than basic click-select, which mirrors the behavior in the 3D view. Reviewed By: Severin, looch Maniphest Tasks: T76595 Differential Revision: https://developer.blender.org/D7737
Diffstat (limited to 'source/blender/makesdna/DNA_anim_types.h')
-rw-r--r--source/blender/makesdna/DNA_anim_types.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 7cb9978f768..a13ed0b2924 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -550,6 +550,9 @@ typedef enum eDriver_Flags {
/* F-Curves -------------------------------------- */
+/** When #active_keyframe_index is set to this, the FCurve does not have an active keyframe. */
+#define FCURVE_ACTIVE_KEYFRAME_NONE -1
+
/**
* FPoint (fpt)
*
@@ -587,10 +590,15 @@ typedef struct FCurve {
/** Total number of points which define the curve (i.e. size of arrays in FPoints). */
unsigned int totvert;
+ /**
+ * 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.
+ */
+ int active_keyframe_index;
+
/* value cache + settings */
/** Value stored from last time curve was evaluated (not threadsafe, debug display only!). */
float curval;
- char _pad2[4];
/** User-editable settings for this curve. */
short flag;
/** Value-extending mode for this curve (does not cover). */