Fix T95262: instances ignored in Frame Selected operator

The issue was that the code only looked at `dob->ob`
instead of `dob->ob_data` which is necessary since
rB5a9a16334c573c4566dc9b2a314cf0d0ccdcb54f.

This now uses the same pattern that is used in other places
where `BKE_object_replace_data_on_shallow_copy` is used.
This commit is contained in:
Jacques Lucke 2022-02-01 11:58:53 +01:00
parent 84dab8b597
commit 217e0a2ce6
Notes: blender-bot 2023-02-14 06:17:14 +01:00
Referenced by issue #95815, Crash with nested linked objects and zoom to (numpad ".") function.
Referenced by issue #95262, Frame Selected in 3d viewport does not respect Geo Nodes instances
1 changed files with 7 additions and 1 deletions

View File

@ -4189,7 +4189,11 @@ bool BKE_object_minmax_dupli(Depsgraph *depsgraph,
/* pass */
}
else {
BoundBox *bb = BKE_object_boundbox_get(dob->ob);
Object temp_ob = *dob->ob;
/* Do not modify the original boundbox. */
temp_ob.runtime.bb = nullptr;
BKE_object_replace_data_on_shallow_copy(&temp_ob, dob->ob_data);
BoundBox *bb = BKE_object_boundbox_get(&temp_ob);
if (bb) {
int i;
@ -4201,6 +4205,8 @@ bool BKE_object_minmax_dupli(Depsgraph *depsgraph,
ok = true;
}
MEM_SAFE_FREE(temp_ob.runtime.bb);
}
}
free_object_duplilist(lb); /* does restore */