diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-01 13:58:53 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-01 13:58:53 +0300 |
commit | 217e0a2ce615921040da4b524d2393d4db5ab68e (patch) | |
tree | 9f892c0fb4dbe3b5ead65e66510e1a13363798e3 /source/blender/blenkernel/intern/object.cc | |
parent | 84dab8b5973c84bfe816fb95c8c3f2b0a6ddeb3e (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/object.cc')
-rw-r--r-- | source/blender/blenkernel/intern/object.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index e177b1ce29e..f9484205ef6 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -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 */ |