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/makesdna/DNA_space_types.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_space_types.h') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 4276e8b568e..f27a89a3d83 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -152,9 +152,12 @@ typedef struct SpaceProperties { short mainb, mainbo, mainbuser; /** Preview is signal to refresh. */ short preview; - char _pad[5]; + char _pad[4]; char flag; + /* eSpaceButtons_OutlinerSync */ + char outliner_sync; + /** Runtime. */ void *path; /** Runtime. */ @@ -232,6 +235,13 @@ typedef enum eSpaceButtons_Flag { SB_SHADING_CONTEXT = (1 << 4), } eSpaceButtons_Flag; +/* SpaceProperties.outliner_sync */ +typedef enum eSpaceButtons_OutlinerSync { + PROPERTIES_SYNC_AUTO = 0, + PROPERTIES_SYNC_OFF = 1, + PROPERTIES_SYNC_ON = 2, +} eSpaceButtons_OutlinerSync; + /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3