From 71eb65328078d3b3ca440a9a23a7aa08238a6710 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Wed, 7 Aug 2019 22:27:07 -0600 Subject: Outliner: Synced selection and active element highlighting Adds a toggle to the filter menu for outliner synced selection. Enabled by default, this ensures selection is synced between objects, bones, and sequences. An active outliner element theme color is added to indicate which element is active. Synced selection is controlled on the operator level. Each operator that modifies selection for objects, bones, sequences, or outliner elements needs to call the respective ED_outliner_select_sync_from.. function to tag outliners to be synced. Syncing is done lazily on outliner draw. --- source/blender/makesdna/DNA_space_types.h | 8 +++++++- 1 file changed, 7 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 505042432ed..707b312e967 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -244,7 +244,12 @@ typedef struct SpaceOutliner { char search_string[64]; struct TreeStoreElem search_tse; - short flag, outlinevis, storeflag, search_flags; + short flag, outlinevis, storeflag; + char search_flags; + + /** Selection syncing flag (#WM_OUTLINER_SYNC_SELECT_FROM_OBJECT and similar flags). */ + char sync_select_dirty; + int filter; char filter_state; char show_restrict_flags; @@ -263,6 +268,7 @@ typedef enum eSpaceOutliner_Flag { SO_FLAG_UNUSED_1 = (1 << 2), /* cleared */ SO_HIDE_KEYINGSETINFO = (1 << 3), SO_SKIP_SORT_ALPHA = (1 << 4), + SO_SYNC_SELECT = (1 << 5), } eSpaceOutliner_Flag; /* SpaceOutliner.filter */ -- cgit v1.2.3