[Bf-blender-cvs] [367a9445416] soc-2019-outliner: Rename sync select set type functions for more clarity
Nathan Craddock
noreply at git.blender.org
Wed Aug 7 07:03:53 CEST 2019
Commit: 367a94454165629e5b165d98e60a1d6adcc157ca
Author: Nathan Craddock
Date: Tue Aug 6 23:03:37 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB367a94454165629e5b165d98e60a1d6adcc157ca
Rename sync select set type functions for more clarity
===================================================================
M source/blender/editors/space_outliner/outliner_sync.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index 474188043ee..040644ee4c6 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -110,9 +110,22 @@ typedef struct SyncSelectTypes {
bool sequence;
} SyncSelectTypes;
+/* Set which types of data to sync when syncing selection from the outliner */
+static void outliner_sync_select_from_outliner_set_types(SpaceOutliner *soops,
+ SyncSelectTypes *sync_types)
+{
+ const bool sequence_view = soops->outlinevis == SO_SEQUENCE;
+
+ sync_types->object = !sequence_view;
+ sync_types->edit_bone = !sequence_view;
+ sync_types->pose_bone = !sequence_view;
+ sync_types->sequence = sequence_view;
+}
+
/* Current dirty flags and outliner display mode determine which type of syncing should occur.
* This is to ensure sync flag data is not lost on sync in the wrong display mode */
-static void set_sync_select_types(SpaceOutliner *soops, SyncSelectTypes *sync_types)
+static void outliner_sync_select_to_outliner_set_types(SpaceOutliner *soops,
+ SyncSelectTypes *sync_types)
{
const bool sequence_view = soops->outlinevis == SO_SEQUENCE;
@@ -126,16 +139,6 @@ static void set_sync_select_types(SpaceOutliner *soops, SyncSelectTypes *sync_ty
(soops->sync_select_dirty & WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE);
}
-static void set_sync_select_types_from_outliner(SpaceOutliner *soops, SyncSelectTypes *sync_types)
-{
- const bool sequence_view = soops->outlinevis == SO_SEQUENCE;
-
- sync_types->object = !sequence_view;
- sync_types->edit_bone = !sequence_view;
- sync_types->pose_bone = !sequence_view;
- sync_types->sequence = sequence_view;
-}
-
static void outliner_select_sync_to_object(ViewLayer *view_layer,
TreeElement *te,
TreeStoreElem *tselem)
@@ -244,7 +247,7 @@ void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *soops)
ViewLayer *view_layer = CTX_data_view_layer(C);
SyncSelectTypes sync_types;
- set_sync_select_types_from_outliner(soops, &sync_types);
+ outliner_sync_select_from_outliner_set_types(soops, &sync_types);
outliner_sync_selection_from_outliner(scene, view_layer, &soops->tree, sync_types);
@@ -408,7 +411,7 @@ void outliner_sync_selection(const bContext *C, SpaceOutliner *soops)
/* Set which types of data to sync from sync dirty flag and outliner display mode */
SyncSelectTypes sync_types;
- set_sync_select_types(soops, &sync_types);
+ outliner_sync_select_to_outliner_set_types(soops, &sync_types);
/* Store active object, bones, and sequence */
SyncSelectActiveData active_data;
More information about the Bf-blender-cvs
mailing list