Fix: Viewport stats wrong for Geometry Nodes instances

In some cases when geometry is created in Geometry Nodes
the viewport stats will show 0 because runtime data is not filled.
This patch sets the runtime data on instances.

Differential Revision: https://developer.blender.org/D12738
This commit is contained in:
Erik Abrahamsson 2021-11-05 16:19:09 +01:00
parent 616594fcb1
commit 87e2154daf
1 changed files with 1 additions and 1 deletions

View File

@ -5829,7 +5829,7 @@ void BKE_object_replace_data_on_shallow_copy(Object *ob, ID *new_data)
ob->type = BKE_object_obdata_to_type(new_data);
ob->data = (void *)new_data;
ob->runtime.geometry_set_eval = nullptr;
ob->runtime.data_eval = nullptr;
ob->runtime.data_eval = new_data;
if (ob->runtime.bb != nullptr) {
ob->runtime.bb->flag |= BOUNDBOX_DIRTY;
}