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:
authorBrecht Van Lommel <brecht@blender.org>2022-09-05 18:14:40 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-08 16:23:21 +0300
commit173d8edb0bb6e017235ef85a10963f39725c29ef (patch)
treefc40e57981ed83c0a1bb3532da322843a5571238 /source/blender/editors/space_outliner
parentb5fc8f611e3948a19c26d425496d76079506f480 (diff)
Cleanup: make meaning of base visibility flags more clear
Rename, add comments, and use flag in the depsgraph to ensure the logic matches. Differential Revision: https://developer.blender.org/D15883
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc3
-rw-r--r--source/blender/editors/space_outliner/outliner_select.cc5
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.cc2
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 3f99b19cd16..d8c94d8ee6c 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -3216,7 +3216,8 @@ static bool element_should_draw_faded(const TreeViewContext *tvc,
const Base *base = (te->directdata) ? (const Base *)te->directdata :
BKE_view_layer_base_find(
(ViewLayer *)tvc->view_layer, (Object *)ob);
- const bool is_visible = (base != nullptr) && (base->flag & BASE_VISIBLE_VIEWLAYER);
+ const bool is_visible = (base != nullptr) &&
+ (base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT);
if (!is_visible) {
return true;
}
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc
index 17e78ece941..071b244bd3d 100644
--- a/source/blender/editors/space_outliner/outliner_select.cc
+++ b/source/blender/editors/space_outliner/outliner_select.cc
@@ -191,7 +191,8 @@ void outliner_item_mode_toggle(bContext *C,
Base *base = BKE_view_layer_base_find(tvc->view_layer, ob);
/* Hidden objects can be removed from the mode. */
- if (!base || (!(base->flag & BASE_VISIBLE_DEPSGRAPH) && (ob->mode != tvc->obact->mode))) {
+ if (!base || (!(base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) &&
+ (ob->mode != tvc->obact->mode))) {
return;
}
@@ -239,7 +240,7 @@ static void do_outliner_object_select_recursive(ViewLayer *view_layer,
{
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
Object *ob = base->object;
- if ((((base->flag & BASE_VISIBLE_DEPSGRAPH) != 0) &&
+ if ((((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) != 0) &&
BKE_object_is_child_recursive(ob_parent, ob))) {
ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT);
}
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc
index 070df284c6f..a8f469c135a 100644
--- a/source/blender/editors/space_outliner/outliner_tree.cc
+++ b/source/blender/editors/space_outliner/outliner_tree.cc
@@ -1459,7 +1459,7 @@ static bool outliner_element_visible_get(ViewLayer *view_layer,
bool is_visible = true;
if (exclude_filter & SO_FILTER_OB_STATE_VISIBLE) {
- if ((base->flag & BASE_VISIBLE_VIEWLAYER) == 0) {
+ if ((base->flag & BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT) == 0) {
is_visible = false;
}
}