diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 68df560a389..7a29afb4048 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -3243,5 +3243,33 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + { + /* In the Dope Sheet, for every mode other than Timeline, open the Properties panel. */ + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { + if (sl->spacetype != SPACE_ACTION) { + continue; + } + + /* Skip the timeline, it shouldn't get its Properties panel opened. */ + SpaceAction *saction = (SpaceAction *)sl; + if (saction->mode == SACTCONT_TIMELINE) { + continue; + } + + const bool is_first_space = sl == area->spacedata.first; + ListBase *regionbase = is_first_space ? &area->regionbase : &sl->regionbase; + ARegion *region = BKE_region_find_in_listbase_by_type(regionbase, RGN_TYPE_UI); + if (region == NULL) { + continue; + } + + region->flag &= ~RGN_FLAG_HIDDEN; + } + } + } + } } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 20bf13145fd..745c7137cb2 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2293,17 +2293,6 @@ static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr) } ED_region_visibility_change_update(C, area, channels_region); } - /* For every mode other than the timeline, open the properties panel by default. */ - ARegion *ui_region = BKE_area_find_region_type(area, RGN_TYPE_UI); - if (ui_region) { - if (saction->mode == SACTCONT_TIMELINE) { - ui_region->flag |= RGN_FLAG_HIDDEN; - } - else { - ui_region->flag &= ~RGN_FLAG_HIDDEN; - } - ED_region_visibility_change_update(C, area, ui_region); - } } /* recalculate extents of channel list */