forked from blender/blender
BLEN-359: Implement updates for instances in viewport #20
@ -90,9 +90,7 @@ void BlenderSceneDelegate::update_collection(bool remove, bool visibility)
|
|||||||
if (visibility) {
|
if (visibility) {
|
||||||
/* Check and update visibility */
|
/* Check and update visibility */
|
||||||
for (auto &obj : objects) {
|
for (auto &obj : objects) {
|
||||||
if (obj.second->update_visibility(view3d)) {
|
obj.second->update_visibility(view3d);
|
||||||
obj.second->update();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,12 @@ bool InstancerData::update_visibility(View3D *view3d)
|
|||||||
|
|
||||||
bool prev_visible = visible;
|
bool prev_visible = visible;
|
||||||
visible = BKE_object_is_visible_in_viewport(view3d, parent_obj);
|
visible = BKE_object_is_visible_in_viewport(view3d, parent_obj);
|
||||||
return visible != prev_visible;
|
bool ret = visible != prev_visible;
|
||||||
|
if (ret) {
|
||||||
|
scene_delegate->GetRenderIndex().GetChangeTracker().MarkRprimDirty(
|
||||||
|
p_id, pxr::HdChangeTracker::DirtyVisibility);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
VtValue InstancerData::get_data(TfToken const &key) const
|
VtValue InstancerData::get_data(TfToken const &key) const
|
||||||
|
Loading…
Reference in New Issue
Block a user