Fix T67776: Animation/value keyframe slider doesn't appear in dope sheet

Avoid overwriting user-chosen `SACTION_SLIDERS` flag when switching the
Dope Sheet editor to Shape Key mode. The Shape Key mode now ignores the
flag, and always shows the sliders.

The obvious limitation is that you can't hide the sliders in the Shape
Key editor anymore

Reviewed By: looch, sybren

Differential Revision: https://developer.blender.org/D9121
This commit is contained in:
Christoph Lendenfeld 2020-10-07 12:22:22 +02:00 committed by Sybren A. Stüvel
parent 65a6caafce
commit 4a633fae8a
Notes: blender-bot 2023-02-14 04:31:04 +01:00
Referenced by issue #67776, Animation/value keyframe slider doesn't appear in dope sheet
3 changed files with 11 additions and 9 deletions

View File

@ -341,7 +341,12 @@ class DOPESHEET_MT_view(Menu):
layout.separator()
layout.prop(st, "use_realtime_update")
layout.prop(st, "show_sliders")
# Sliders are always shown in the Shape Key Editor regardless of this setting.
col = layout.column()
col.active = context.space_data.mode != 'SHAPEKEY'
col.prop(st, "show_sliders")
layout.prop(st, "show_group_colors")
layout.prop(st, "show_interpolation")
layout.prop(st, "show_extremes")

View File

@ -5330,9 +5330,12 @@ void ANIM_channel_draw_widgets(const bContext *C,
* and wouldn't be able to auto-keyframe.
* - Slider should start before the toggles (if they're visible)
* to keep a clean line down the side.
* - Sliders are always drawn in Shapekey mode now. Prior to this
* the SACTION_SLIDERS flag would be set when changing into Shapekey mode.
*/
if ((draw_sliders) &&
ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY, ANIMTYPE_GPLAYER)) {
if (((draw_sliders)
&& ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY, ANIMTYPE_GPLAYER))
|| ale->type == ANIMTYPE_SHAPEKEY) {
/* adjust offset */
/* TODO: make slider width dynamic,
* so that they can be easier to use when the view is wide enough. */

View File

@ -2007,12 +2007,6 @@ static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr)
else {
saction->action = NULL;
}
/* 2) enable 'show sliders' by default, since one of the main
* points of the ShapeKey Editor is to provide a one-stop shop
* for controlling the shapekeys, whose main control is the value
*/
saction->flag |= SACTION_SLIDERS;
}
/* make sure action stored is valid */
else if (saction->mode == SACTCONT_ACTION) {