Fix visibility of instancer object #43

Merged
Bogdan Nagirniak merged 16 commits from BLEN-405_1 into hydra-render 2023-05-24 13:44:35 +02:00
Showing only changes of commit 46ab05f378 - Show all commits

View File

@ -308,7 +308,10 @@ bool InstancerData::is_instance_visible(Object *object)
int vis = BKE_object_visibility(object, deg_mode); int vis = BKE_object_visibility(object, deg_mode);
bool ret = vis & OB_VISIBLE_SELF; bool ret = vis & OB_VISIBLE_SELF;
if (deg_mode == DAG_EVAL_VIEWPORT) { if (deg_mode == DAG_EVAL_VIEWPORT) {
if (!ret && (object->transflag & OB_DUPLI) == 0) { if (!ret && ((object->transflag & OB_DUPLI) == 0 ||
(object->transflag & OB_DUPLI &&
object->duplicator_visibility_flag & OB_DUPLI_FLAG_VIEWPORT)))
{
ret = true; ret = true;
} }
} }