[Bf-blender-cvs] [3997ccdb73f] soc-2019-outliner: Outliner Cleanup: Finish renaming multi object to merged
Nathan Craddock
noreply at git.blender.org
Fri Jul 19 21:57:10 CEST 2019
Commit: 3997ccdb73f0962047253fd8953098976ea7ed8f
Author: Nathan Craddock
Date: Fri Jul 19 13:56:16 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB3997ccdb73f0962047253fd8953098976ea7ed8f
Outliner Cleanup: Finish renaming multi object to merged
Cleaned up the select code to use the word merged rather than
multi object for consistency
===================================================================
M source/blender/editors/space_outliner/outliner_select.c
M source/blender/editors/space_outliner/outliner_utils.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index d7c7a1ae1c2..7b48d4a5bb0 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1415,16 +1415,18 @@ static int outliner_item_do_activate_from_cursor(bContext *C,
}
else {
ViewLayer *view_layer = CTX_data_view_layer(C);
- /* the row may also contain children, if one is hovered we want this instead of current te */
- bool multiple_items = false;
+
+ /* The row may also contain children, if one is hovered we want this instead of current te */
+ bool merged_elements = false;
TreeElement *activate_te = outliner_find_item_at_x_in_row(
- soops, te, view_mval[0], &multiple_items);
+ soops, te, view_mval[0], &merged_elements);
- if (multiple_items) {
+ /* If the selected icon was an aggregate of multiple elements, run the search popup */
+ if (merged_elements) {
UI_popup_block_invoke(C, merged_element_search_menu, activate_te, NULL);
-
return OPERATOR_CANCELLED;
}
+
TreeStoreElem *activate_tselem = TREESTORE(activate_te);
if (use_range) {
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c
index 3e32c76734e..146a9f02f51 100644
--- a/source/blender/editors/space_outliner/outliner_utils.c
+++ b/source/blender/editors/space_outliner/outliner_utils.c
@@ -64,7 +64,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops,
static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *parent_te,
float view_co_x,
- bool *r_multiple_objects)
+ bool *r_merged)
{
TreeElement *child_te = parent_te->subtree.first;
@@ -76,14 +76,13 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
return child_te;
}
else if ((child_te->flag & TE_ICONROW_MERGED) && over_element) {
- if (r_multiple_objects) {
- *r_multiple_objects = true;
+ if (r_merged) {
+ *r_merged = true;
}
return child_te;
}
- TreeElement *te = outliner_find_item_at_x_in_row_recursive(
- child_te, view_co_x, r_multiple_objects);
+ TreeElement *te = outliner_find_item_at_x_in_row_recursive(child_te, view_co_x, r_merged);
if (te != child_te) {
return te;
}
@@ -104,11 +103,11 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *soops,
const TreeElement *parent_te,
float view_co_x,
- bool *r_multiple_objects)
+ bool *r_merged)
{
/* if parent_te is opened, it doesn't show children in row */
if (!TSELEM_OPEN(TREESTORE(parent_te), soops)) {
- return outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, r_multiple_objects);
+ return outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, r_merged);
}
return (TreeElement *)parent_te;
More information about the Bf-blender-cvs
mailing list