From 98ad294d1719eb9cec01af08a0db16558e9964a5 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 25 Apr 2022 18:48:35 -0500 Subject: Fix: Correctly copy and update curve type counts cache Missing from f431be224fa583743. --- source/blender/blenkernel/intern/curves.cc | 5 +++++ 1 file changed, 5 insertions(+) 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(__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(__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); } -- cgit v1.2.3