[Bf-blender-cvs] [d2ea9f7beda] soc-2019-outliner: Outliner: Improve walk select

Nathan Craddock noreply at git.blender.org
Thu Jul 11 23:41:56 CEST 2019


Commit: d2ea9f7bedad6d32b9e0f5d82ec9f66a39897362
Author: Nathan Craddock
Date:   Thu Jul 11 15:40:45 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBd2ea9f7bedad6d32b9e0f5d82ec9f66a39897362

Outliner: Improve walk select

Now that walk select doesn't start from active, some selection
operators and syncing needed to set the walk element. So after
some select operators, set the walk element alongside the active
element

===================================================================

M	source/blender/editors/space_outliner/outliner_select.c
M	source/blender/editors/space_outliner/outliner_sync.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 7258d6f122c..dc32530ea57 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1288,16 +1288,17 @@ static void do_outliner_range_select_recursive(ListBase *lb,
 static void do_outliner_range_select(SpaceOutliner *soops, TreeElement *cursor)
 {
   TreeElement *active = outliner_find_element_with_flag(&soops->tree, TSE_ACTIVE);
+  outliner_flag_set(&soops->tree, TSE_WALK, false);
 
   if (!active) {
-    TREESTORE(cursor)->flag |= TSE_SELECTED | TSE_ACTIVE;
+    TREESTORE(cursor)->flag |= TSE_SELECTED | TSE_ACTIVE | TSE_WALK;
     return;
   }
 
   TreeStoreElem *tselem = TREESTORE(active);
   const bool active_selected = (tselem->flag & TSE_SELECTED);
 
-  outliner_flag_set(&soops->tree, TSE_SELECTED, false);
+  outliner_flag_set(&soops->tree, TSE_SELECTED | TSE_WALK, false);
 
   /* Select active if under cursor */
   if (active == cursor) {
@@ -1308,7 +1309,7 @@ static void do_outliner_range_select(SpaceOutliner *soops, TreeElement *cursor)
   /* If active is not selected, just select the element under the cursor */
   if (!active_selected || !outliner_is_element_visible(active)) {
     tselem->flag &= ~TSE_ACTIVE;
-    TREESTORE(cursor)->flag |= TSE_SELECTED | TSE_ACTIVE;
+    TREESTORE(cursor)->flag |= TSE_SELECTED | TSE_ACTIVE | TSE_WALK;
     return;
   }
 
diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index 56686d15461..c6789337165 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -190,7 +190,7 @@ static void outliner_sync_selection_to_outliner(const bContext *C,
       Bone *bone = pchan->bone;
 
       if (pchan == pchan_active) {
-        tselem->flag |= TSE_ACTIVE;
+        tselem->flag |= TSE_ACTIVE | TSE_WALK;
       }
 
       if (bone->flag & BONE_SELECTED) {



More information about the Bf-blender-cvs mailing list