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.
This commit is contained in:
Jacques Lucke 2021-02-10 12:48:17 +01:00
parent f617782fc1
commit d76890bfb0
Notes: blender-bot 2023-02-14 11:28:39 +01:00
Referenced by issue #85492, Particles System not rendering in Blender 2.93 / 2.92 beta
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}