Fix: Correctly copy and update curve type counts cache
Missing from f431be224f
.
This commit is contained in:
parent
96834a7bac
commit
98ad294d17
Notes:
blender-bot
2023-02-14 05:22:18 +01:00
Referenced by issue #98190, Render of 3D image is very slow
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue