forked from blender/blender
Fix visibility of instancer object #43
@ -268,8 +268,15 @@ void InstancerData::update_double_sided(MaterialData *mat_data)
|
|||||||
|
|
||||||
bool InstancerData::is_instance_visible(Object *object)
|
bool InstancerData::is_instance_visible(Object *object)
|
||||||
{
|
{
|
||||||
int vis = BKE_object_visibility(object, DEG_get_mode(scene_delegate_->depsgraph));
|
eEvaluationMode deg_mode = DEG_get_mode(scene_delegate_->depsgraph);
|
||||||
return vis & OB_VISIBLE_SELF;
|
int vis = BKE_object_visibility(object, deg_mode);
|
||||||
|
bool ret = vis & OB_VISIBLE_SELF;
|
||||||
|
if (deg_mode == DAG_EVAL_VIEWPORT) {
|
||||||
|
if (!ret && (object->transflag & OB_DUPLI) == 0) {
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
pxr::SdfPath InstancerData::object_prim_id(Object *object) const
|
pxr::SdfPath InstancerData::object_prim_id(Object *object) const
|
||||||
|
@ -103,7 +103,6 @@ void ObjectData::update_parent()
|
|||||||
scene_delegate_->instancer_prim_id(ob));
|
scene_delegate_->instancer_prim_id(ob));
|
||||||
if (i_data) {
|
if (i_data) {
|
||||||
i_data->update_as_parent();
|
i_data->update_as_parent();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user