diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-12-22 00:27:09 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-12-22 00:31:32 +0300 |
commit | ffacce5be41df68658f8478fee73e74701d2b545 (patch) | |
tree | 71981b37cedbb77b002ae27511471c96c63597b8 /release | |
parent | 2d6e6d035b664d6244fd48090cb8545145032f9f (diff) |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_properties.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_properties.py b/release/scripts/startup/bl_ui/space_properties.py index 765cab1ace2..b2a7246af75 100644 --- a/release/scripts/startup/bl_ui/space_properties.py +++ b/release/scripts/startup/bl_ui/space_properties.py @@ -46,6 +46,8 @@ class PROPERTIES_HT_header(Header): layout.separator_spacer() + layout.popover(panel="PROPERTIES_PT_options", text="") + class PROPERTIES_PT_navigation_bar(Panel): bl_space_type = 'PROPERTIES' @@ -69,9 +71,25 @@ class PROPERTIES_PT_navigation_bar(Panel): layout.prop_tabs_enum(view, "context", icon_only=True) +class PROPERTIES_PT_options(Panel): + bl_space_type = 'PROPERTIES' + bl_region_type = 'HEADER' + bl_label = 'Options' + + def draw(self, context): + layout = self.layout + + space = context.space_data + + col = layout.column() + col.label(text="Sync with Outliner") + col.row().prop(space, "outliner_sync", expand=True) + + classes = ( PROPERTIES_HT_header, PROPERTIES_PT_navigation_bar, + PROPERTIES_PT_options, ) if __name__ == "__main__": # only for live edit. |