diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_convert.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index dc9ec002d1a..abf106164f7 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -913,7 +913,7 @@ static void curve_to_mesh_eval_ensure(Object &object) Object bevel_object; blender::dna::zero_memory(bevel_object); if (curve.bevobj != nullptr) { - blender::dna::copy_memory(bevel_object, *curve.bevobj); + bevel_object = blender::dna::shallow_copy(*curve.bevobj); BLI_listbase_clear(&bevel_object.modifiers); BKE_object_runtime_reset(&bevel_object); curve.bevobj = &bevel_object; @@ -923,7 +923,7 @@ static void curve_to_mesh_eval_ensure(Object &object) Object taper_object; blender::dna::zero_memory(taper_object); if (curve.taperobj != nullptr) { - blender::dna::copy_memory(taper_object, *curve.taperobj); + taper_object = blender::dna::shallow_copy(*curve.taperobj); BLI_listbase_clear(&taper_object.modifiers); BKE_object_runtime_reset(&taper_object); curve.taperobj = &taper_object; @@ -1067,8 +1067,7 @@ static Mesh *mesh_new_from_mesh_object_with_layers(Depsgraph *depsgraph, return nullptr; } - Object object_for_eval; - blender::dna::copy_memory(object_for_eval, *object); + Object object_for_eval = blender::dna::shallow_copy(*object); if (object_for_eval.runtime.data_orig != nullptr) { object_for_eval.data = object_for_eval.runtime.data_orig; } |