diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/curves.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc index a3b40b27583..1df1492bac1 100644 --- a/source/blender/blenkernel/intern/curves.cc +++ b/source/blender/blenkernel/intern/curves.cc @@ -89,6 +89,8 @@ static void curves_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, dst.runtime = MEM_new<bke::CurvesGeometryRuntime>(__func__); + dst.runtime->type_counts = src.runtime->type_counts; + dst.update_customdata_pointers(); curves_dst->batch_cache = nullptr; @@ -175,6 +177,9 @@ static void curves_blend_read_data(BlendDataReader *reader, ID *id) curves->geometry.runtime = MEM_new<blender::bke::CurvesGeometryRuntime>(__func__); + /* Recalculate curve type count cache that isn't saved in files. */ + blender::bke::CurvesGeometry::wrap(curves->geometry).update_curve_types(); + /* Materials */ BLO_read_pointer_array(reader, (void **)&curves->mat); } |