diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-08 12:07:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-08 12:07:20 +0300 |
commit | c146ce977cea962e82f9b542bdf4d342d6ec0d2a (patch) | |
tree | c537e60709cba2523db168050f956e5c3d45fbfc /source | |
parent | d765068fca979efece01bf124141d4df56fca9ef (diff) |
Quick ShapeKey Editor fix (i.e. submode of DopeSheet):
Switching to ShapeKey Editor mode now shows the sliders again
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index cc44a1b6c14..21258458a57 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -464,6 +464,19 @@ static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr) } } +static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr) +{ + SpaceAction *saction= (SpaceAction*)(ptr->data); + + /* special exception for ShapeKey Editor mode: + * 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 + */ + if (saction->mode == SACTCONT_SHAPEKEY) + saction->flag |= SACTION_SLIDERS; +} + static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr) { SpaceIpo *sipo= (SpaceIpo*)(ptr->data); @@ -1251,7 +1264,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, mode_items); RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed."); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update"); /* display */ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); |