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/depsgraph
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/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_iter.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_visibility.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index 2d2ee5dc4b4..bcae5de1e1e 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -182,7 +182,7 @@ bool deg_iterator_duplis_step(DEGObjectIterData *data)
}
/* Duplicated elements shouldn't care whether their original collection is visible or not. */
- temp_dupli_object->base_flag |= BASE_VISIBLE_DEPSGRAPH;
+ temp_dupli_object->base_flag |= BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT;
int ob_visibility = BKE_object_visibility(temp_dupli_object, data->eval_mode);
if ((ob_visibility & (OB_VISIBLE_SELF | OB_VISIBLE_PARTICLES)) == 0) {
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
index e35e992fc8b..515c9a197d7 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
@@ -36,8 +36,7 @@ void deg_evaluate_object_node_visibility(::Depsgraph *depsgraph, IDNode *id_node
bool is_enabled;
if (graph->mode == DAG_EVAL_VIEWPORT) {
- is_enabled = (object->base_flag & BASE_ENABLED_VIEWPORT) &&
- ((object->base_flag & BASE_HIDDEN) == 0);
+ is_enabled = (object->base_flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT);
}
else {
is_enabled = (object->base_flag & BASE_ENABLED_RENDER);