diff options
author | Hans Goudey <h.goudey@me.com> | 2020-10-07 16:27:58 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-10-07 16:27:58 +0300 |
commit | 983ad4210b9e3dc6fe98553e686b213423e00fa1 (patch) | |
tree | 06361a54c87221515d112e94892078eced25e01f /source/blender/makesrna/intern/rna_userdef.c | |
parent | ef235b0f172832403c5eaa2b2d510dd6f0dd8a14 (diff) |
Fix T76595: Indicate the Active Keyframe in Graph Editor
In the graph editor there is a panel that says "Active Keyframe" for
numerically editing a keyframe's values, but in the code there is no
concept of the "active keyframe." Since this is a useful concept to
have for some other features anyway, this commit adds an active
keyframe index value to FCurves. It also displays it with a theme
color for the active vertex (which didn't exist before) if the
FCurve is active.
The active keyframe in the graph editor is treated similarly to the
active vertex in the 3D view. It is the keyframe most recently selected
with a single click, and it is always selected.
For now, the only real functional change is that the active keyframe
appears in white and it should be more predictable which keyframe is
being edited in the sidebar panel.
Differential Revision: https://developer.blender.org/D7737
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 2e9838d689b..8d36b7dc08f 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1895,6 +1895,11 @@ static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna) RNA_def_property_ui_text(prop, "Vertex Select", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "vertex_active", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Active Vertex", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "vertex_size", PROP_INT, PROP_PIXEL); RNA_def_property_range(prop, 1, 32); RNA_def_property_ui_text(prop, "Vertex Size", ""); |