From ffacce5be41df68658f8478fee73e74701d2b545 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Mon, 21 Dec 2020 14:27:09 -0700 Subject: UI: Properties editor popover and outliner sync This adds a popover to the properties editor. Currently the only setting is for controlling outliner to properties syncing. Because we cannot define a perfect heuristic to determine when properties editors should change tabs based on outliner icon selection, we need an option to enable or disable this behavior per properties editor. There are 3 options for controlling the syncing. Auto uses the heuristic to only allow tab switching when a properties editor and outliner share a border. On and off enable and disable syncing respectively. Differential Revision: https://developer.blender.org/D9758 --- source/blender/blenloader/intern/versioning_290.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index cd5939b7e63..0c64e835e8b 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1458,5 +1458,17 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } FOREACH_NODETREE_END; + + /* Default properties editors to auto outliner sync. */ + LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { + LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { + LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) { + if (space->spacetype == SPACE_PROPERTIES) { + SpaceProperties *space_properties = (SpaceProperties *)space; + space_properties->outliner_sync = PROPERTIES_SYNC_AUTO; + } + } + } + } } } -- cgit v1.2.3