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
This commit is contained in:
parent
e4a779264c
commit
b08c5381ac
Notes:
blender-bot
2025-02-14 01:33:33 +00:00
Referenced by issue #97980, N-panel visible by default in Animation editors
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -90,7 +90,6 @@ static SpaceLink *action_create(const ScrArea *area, const Scene *scene)
|
||||
BLI_addtail(&saction->regionbase, region);
|
||||
region->regiontype = RGN_TYPE_UI;
|
||||
region->alignment = RGN_ALIGN_RIGHT;
|
||||
region->flag = RGN_FLAG_HIDDEN;
|
||||
|
||||
/* main region */
|
||||
region = MEM_callocN(sizeof(ARegion), "main region for action");
|
||||
|
@ -90,7 +90,6 @@ static SpaceLink *graph_create(const ScrArea *UNUSED(area), const Scene *scene)
|
||||
BLI_addtail(&sipo->regionbase, region);
|
||||
region->regiontype = RGN_TYPE_UI;
|
||||
region->alignment = RGN_ALIGN_RIGHT;
|
||||
region->flag = RGN_FLAG_HIDDEN;
|
||||
|
||||
/* main region */
|
||||
region = MEM_callocN(sizeof(ARegion), "main region for graphedit");
|
||||
|
@ -79,7 +79,6 @@ static SpaceLink *nla_create(const ScrArea *area, const Scene *scene)
|
||||
BLI_addtail(&snla->regionbase, region);
|
||||
region->regiontype = RGN_TYPE_UI;
|
||||
region->alignment = RGN_ALIGN_RIGHT;
|
||||
region->flag = RGN_FLAG_HIDDEN;
|
||||
|
||||
/* main region */
|
||||
region = MEM_callocN(sizeof(ARegion), "main region for nla");
|
||||
|
Loading…
x
Reference in New Issue
Block a user