Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2019-08-31 05:49:58 +0300
committerNathan Craddock <nzcraddock@gmail.com>2019-08-31 06:09:40 +0300
commite72053a201d5ec6cd4fee85bc407e98cdc373483 (patch)
tree7197011f6cfec374e01eb061c28acb9e3018c972 /source/blender/editors/space_outliner
parent82627c50163fe19d73c2d2ed4c0162237ac441ab (diff)
Outliner: fix unnecessary syncing
Depending on the outliner display mode and the outliner dirty state, a sync may not be needed on each draw. This commit adds a check before syncing to prevent syncing when not needed.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_sync.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index 4b804c3c480..29c820bce92 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -544,12 +544,12 @@ static void get_sync_select_active_data(const bContext *C, SyncSelectActiveData
/* If outliner is dirty sync selection from view layer and sequwncer */
void outliner_sync_selection(const bContext *C, SpaceOutliner *soops)
{
- if (soops->sync_select_dirty & WM_OUTLINER_SYNC_SELECT_FROM_ALL) {
- ViewLayer *view_layer = CTX_data_view_layer(C);
+ /* Set which types of data to sync from sync dirty flag and outliner display mode */
+ SyncSelectTypes sync_types;
+ const bool sync_required = outliner_sync_select_to_outliner_set_types(C, soops, &sync_types);
- /* Set which types of data to sync from sync dirty flag and outliner display mode */
- SyncSelectTypes sync_types;
- outliner_sync_select_to_outliner_set_types(C, soops, &sync_types);
+ if (sync_required) {
+ ViewLayer *view_layer = CTX_data_view_layer(C);
/* Store active object, bones, and sequence */
SyncSelectActiveData active_data;