[Bf-blender-cvs] [6c3564bff9e] soc-2019-outliner: Outliner: Activate elements on walk select
Nathan Craddock
noreply at git.blender.org
Sun Jul 7 06:24:51 CEST 2019
Commit: 6c3564bff9e2d024176acad9a722e2291b5f5bf9
Author: Nathan Craddock
Date: Sat Jul 6 22:23:44 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB6c3564bff9e2d024176acad9a722e2291b5f5bf9
Outliner: Activate elements on walk select
Rather than just setting flags, activate outliner elements
to support toggling modes. This still needs some work while in
synced selection mode. Outside of synced selection it works
well
===================================================================
M source/blender/editors/space_outliner/outliner_select.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 861028e1c8c..fa3401f49c0 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1638,11 +1638,11 @@ static TreeElement *do_outliner_select_walk_down(SpaceOutliner *soops, TreeEleme
return active;
}
-static void do_outliner_select_walk(SpaceOutliner *soops,
- TreeElement *active,
- const int direction,
- const bool extend)
+static void do_outliner_select_walk(
+ bContext *C, SpaceOutliner *soops, TreeElement *active, const int direction, const bool extend)
{
+ Scene *scene = CTX_data_scene(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
TreeStoreElem *tselem = TREESTORE(active);
if (!extend) {
@@ -1680,7 +1680,10 @@ static void do_outliner_select_walk(SpaceOutliner *soops,
tselem->flag |= new_flag;
}
- tselem_new->flag |= TSE_SELECTED | TSE_ACTIVE;
+ /* Activate rather than just setting flags to support mode switching */
+ outliner_item_select(soops, active, extend, extend);
+ do_outliner_item_activate_tree_element(
+ C, scene, view_layer, soops, active, tselem_new, extend, false);
}
static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
@@ -1714,7 +1717,7 @@ static int outliner_walk_select_invoke(bContext *C, wmOperator *op, const wmEven
tselem->flag |= TSE_SELECTED;
}
else {
- do_outliner_select_walk(soops, active, direction, extend);
+ do_outliner_select_walk(C, soops, active, direction, extend);
}
}
More information about the Bf-blender-cvs
mailing list