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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-06 15:41:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-06 15:41:52 +0300
commit79dabc537e3e345c3e536a6369b1d130942155c3 (patch)
treef590f04ff819c33d0b9185f4a361f92ad79404c1
parentb0c32818ba401a81c18f89f931d4336d8e859bc2 (diff)
parent3527857cdca1f5d07037f20fed9840efe1954a57 (diff)
Merge branch 'master' into blender2.8
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c28
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h4
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c6
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c4
5 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 1c78931b449..d8a5ba533c4 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -165,7 +165,7 @@ static int outliner_highlight_update(bContext *C, wmOperator *UNUSED(op), const
bool changed = false;
if (!hovered_te || !(hovered_te->store_elem->flag & TSE_HIGHLIGHTED)) {
- changed = outliner_set_flag(&soops->tree, TSE_HIGHLIGHTED, false);
+ changed = outliner_flag_set(&soops->tree, TSE_HIGHLIGHTED, false);
if (hovered_te) {
hovered_te->store_elem->flag |= TSE_HIGHLIGHTED;
changed = true;
@@ -201,7 +201,7 @@ static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement
/* all below close/open? */
if (all) {
tselem->flag &= ~TSE_CLOSED;
- outliner_set_flag(&te->subtree, TSE_CLOSED, !outliner_has_one_flag(&te->subtree, TSE_CLOSED, 1));
+ outliner_flag_set(&te->subtree, TSE_CLOSED, !outliner_flag_is_any_test(&te->subtree, TSE_CLOSED, 1));
}
else {
if (tselem->flag & TSE_CLOSED) tselem->flag &= ~TSE_CLOSED;
@@ -834,7 +834,7 @@ static int outliner_count_levels(ListBase *lb, const int curlevel)
return level;
}
-int outliner_has_one_flag(ListBase *lb, short flag, const int curlevel)
+int outliner_flag_is_any_test(ListBase *lb, short flag, const int curlevel)
{
TreeElement *te;
TreeStoreElem *tselem;
@@ -844,7 +844,7 @@ int outliner_has_one_flag(ListBase *lb, short flag, const int curlevel)
tselem = TREESTORE(te);
if (tselem->flag & flag) return curlevel;
- level = outliner_has_one_flag(&te->subtree, flag, curlevel + 1);
+ level = outliner_flag_is_any_test(&te->subtree, flag, curlevel + 1);
if (level) return level;
}
return 0;
@@ -854,7 +854,7 @@ int outliner_has_one_flag(ListBase *lb, short flag, const int curlevel)
* Set or unset \a flag for all outliner elements in \a lb and sub-trees.
* \return if any flag was modified.
*/
-bool outliner_set_flag(ListBase *lb, short flag, short set)
+bool outliner_flag_set(ListBase *lb, short flag, short set)
{
TreeElement *te;
TreeStoreElem *tselem;
@@ -874,7 +874,7 @@ bool outliner_set_flag(ListBase *lb, short flag, short set)
tselem->flag |= flag;
changed = true;
}
- changed |= outliner_set_flag(&te->subtree, flag, set);
+ changed |= outliner_flag_set(&te->subtree, flag, set);
}
return changed;
@@ -914,10 +914,10 @@ static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
SpaceOops *soops = CTX_wm_space_outliner(C);
ARegion *ar = CTX_wm_region(C);
- if (outliner_has_one_flag(&soops->tree, TSE_CLOSED, 1))
- outliner_set_flag(&soops->tree, TSE_CLOSED, 0);
+ if (outliner_flag_is_any_test(&soops->tree, TSE_CLOSED, 1))
+ outliner_flag_set(&soops->tree, TSE_CLOSED, 0);
else
- outliner_set_flag(&soops->tree, TSE_CLOSED, 1);
+ outliner_flag_set(&soops->tree, TSE_CLOSED, 1);
ED_region_tag_redraw(ar);
@@ -946,10 +946,10 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op))
ARegion *ar = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
- if (outliner_has_one_flag(&soops->tree, TSE_SELECTED, 1))
- outliner_set_flag(&soops->tree, TSE_SELECTED, 0);
+ if (outliner_flag_is_any_test(&soops->tree, TSE_SELECTED, 1))
+ outliner_flag_set(&soops->tree, TSE_SELECTED, 0);
else
- outliner_set_flag(&soops->tree, TSE_SELECTED, 1);
+ outliner_flag_set(&soops->tree, TSE_SELECTED, 1);
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
@@ -1211,7 +1211,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
outliner_set_coordinates(ar, soops);
/* deselect all visible, and select found element */
- outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
+ outliner_flag_set(soops, &soops->tree, TSE_SELECTED, 0);
tselem->flag |= TSE_SELECTED;
/* make te->ys center of view */
@@ -1271,7 +1271,7 @@ static int outliner_one_level_exec(bContext *C, wmOperator *op)
const bool add = RNA_boolean_get(op->ptr, "open");
int level;
- level = outliner_has_one_flag(&soops->tree, TSE_CLOSED, 1);
+ level = outliner_flag_is_any_test(&soops->tree, TSE_CLOSED, 1);
if (add == 1) {
if (level) outliner_openclose_level(&soops->tree, 1, level, 1);
}
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 0ab22208841..0763933b102 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -245,8 +245,8 @@ void outliner_do_object_operation(
int common_restrict_check(struct bContext *C, struct Object *ob);
-int outliner_has_one_flag(ListBase *lb, short flag, const int curlevel);
-bool outliner_set_flag(ListBase *lb, short flag, short set);
+int outliner_flag_is_any_test(ListBase *lb, short flag, const int curlevel);
+bool outliner_flag_set(ListBase *lb, short flag, short set);
void object_toggle_visibility_cb(
struct bContext *C, struct ReportList *reports, struct Scene *scene,
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index b061e8537c2..760e2853038 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -370,7 +370,7 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator *op, const wmE
/* by default we don't change the item position */
te_dragged->drag_data->insert_handle = te_dragged;
/* unset highlighted tree element, dragged one will be highlighted instead */
- outliner_set_flag(&soops->tree, TSE_HIGHLIGHTED, false);
+ outliner_flag_set(&soops->tree, TSE_HIGHLIGHTED, false);
ED_region_tag_redraw_no_rebuild(ar);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index bc514914b81..7ab13f36953 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1028,7 +1028,7 @@ void outliner_item_select(SpaceOops *soops, const TreeElement *te, const bool ex
const short new_flag = toggle ? (tselem->flag ^ TSE_SELECTED) : (tselem->flag | TSE_SELECTED);
if (extend == false) {
- outliner_set_flag(&soops->tree, TSE_SELECTED, false);
+ outliner_flag_set(&soops->tree, TSE_SELECTED, false);
}
tselem->flag = new_flag;
}
@@ -1039,8 +1039,8 @@ static void outliner_item_toggle_closed(TreeElement *te, const bool toggle_child
if (toggle_children) {
tselem->flag &= ~TSE_CLOSED;
- const bool all_opened = !outliner_has_one_flag(&te->subtree, TSE_CLOSED, 1);
- outliner_set_flag(&te->subtree, TSE_CLOSED, all_opened);
+ const bool all_opened = !outliner_flag_is_any_test(&te->subtree, TSE_CLOSED, 1);
+ outliner_flag_set(&te->subtree, TSE_CLOSED, all_opened);
}
else {
tselem->flag ^= TSE_CLOSED;
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index b23ea8e4dae..190ef9fa229 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1817,8 +1817,8 @@ static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOops *soop
/* select object that's clicked on and popup context menu */
if (!(tselem->flag & TSE_SELECTED)) {
- if (outliner_has_one_flag(&soops->tree, TSE_SELECTED, 1))
- outliner_set_flag(&soops->tree, TSE_SELECTED, 0);
+ if (outliner_flag_is_any_test(&soops->tree, TSE_SELECTED, 1))
+ outliner_flag_set(&soops->tree, TSE_SELECTED, 0);
tselem->flag |= TSE_SELECTED;