diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-08 07:27:07 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2019-08-16 21:30:53 +0300 |
commit | 71eb65328078d3b3ca440a9a23a7aa08238a6710 (patch) | |
tree | eae7a6c557af86911d867f4644a24a618394dc9a /source/blender/editors/include | |
parent | 7ba2720a70c83eb41f577aae4eb5a3403f6bb6b9 (diff) |
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.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_outliner.h | 11 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_outliner.h b/source/blender/editors/include/ED_outliner.h index e94aedc2b2b..a28b1b8483a 100644 --- a/source/blender/editors/include/ED_outliner.h +++ b/source/blender/editors/include/ED_outliner.h @@ -30,4 +30,15 @@ bool ED_outliner_collections_editor_poll(struct bContext *C); void ED_outliner_selected_objects_get(const struct bContext *C, struct ListBase *objects); +void ED_outliner_select_sync_from_object_tag(struct bContext *C); +void ED_outliner_select_sync_from_edit_bone_tag(struct bContext *C); +void ED_outliner_select_sync_from_pose_bone_tag(struct bContext *C); +void ED_outliner_select_sync_from_sequence_tag(struct bContext *C); + +bool ED_outliner_select_sync_is_dirty(const struct bContext *C); + +void ED_outliner_select_sync_from_outliner(struct bContext *C, struct SpaceOutliner *soops); + +void ED_outliner_select_sync_flag_outliners(const struct bContext *C); + #endif /* __ED_OUTLINER_H__ */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 3b080b6df95..29022adac6c 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -255,6 +255,7 @@ typedef enum ThemeColorID { TH_MATCH, /* highlight color for search matches */ TH_SELECT_HIGHLIGHT, /* highlight color for selected outliner item */ + TH_SELECT_ACTIVE, /* highlight color for active outliner item */ TH_SELECTED_OBJECT, /* selected object color for outliner */ TH_ACTIVE_OBJECT, /* active object color for outliner */ TH_EDITED_OBJECT, /* edited object color for outliner */ |