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:
authorJacques Lucke <jacques@blender.org>2021-02-10 14:48:17 +0300
committerJacques Lucke <jacques@blender.org>2021-02-10 14:48:17 +0300
commitd76890bfb0bba78d7ad617c5ad8fb284cd9814d4 (patch)
tree8128972cd66aa451883a17a5c5a4eca5829f645b /source/blender/blenkernel/intern/object.c
parentf617782fc101c844959c799ad584a37f3b6e523a (diff)
Fix T85492: fix check if object has visible instances
Without this, `OB_VISIBLE_INSTANCES` would be added to `visibility` incorrectly, leading to unexpected visibility changes down the line.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 155508e9caa..70af46569a8 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1957,7 +1957,8 @@ int BKE_object_visibility(const Object *ob, const int dag_eval_mode)
visibility |= OB_VISIBLE_INSTANCES;
}
- if (ob->runtime.geometry_set_eval != NULL) {
+ if (ob->runtime.geometry_set_eval != NULL &&
+ BKE_geometry_set_has_instances(ob->runtime.geometry_set_eval)) {
visibility |= OB_VISIBLE_INSTANCES;
}