diff options
author | Nate Rupsis <nrupsis> | 2022-07-26 12:32:33 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-07-26 12:43:05 +0300 |
commit | b08c5381ac7f230057d2e1b559911dff55df0670 (patch) | |
tree | 8ff5ff0616bf20551aae5f480a04f5b4a895f7b7 /source/blender/blenloader | |
parent | e4a779264c41bf6db139f75b1f87b0764fd3a67e (diff) |
default N-panel open for animation editors
The Graph, Driver, and Dopesheet's (and sub modes) properties panel
(N-Panel) are now open by default. This includes the editors in the
default Animation workspace.
Note that, because the Timeline is implemented as a special mode of the
Dopesheet, switching between Timeline and Dopesheet will *not* change
the visibility of the properties panel.
Maniphest Tasks: T97980
Differential Revision: https://developer.blender.org/D14910
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 28 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 8 |
2 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index bbbeba4d687..fa3789ea590 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -875,6 +875,34 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports)) */ { /* 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/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index dfd98cb94f3..a2e3fd5346e 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -134,6 +134,14 @@ static void blo_update_defaults_screen(bScreen *screen, } } } + else { + /* Open properties panel by default. */ + LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { + if (region->regiontype == RGN_TYPE_UI) { + region->flag &= ~RGN_FLAG_HIDDEN; + } + } + } } else if (area->spacetype == SPACE_GRAPH) { SpaceGraph *sipo = area->spacedata.first; |