Mesh: Move runtime data out of DNA
This commit replaces the `Mesh_Runtime` struct embedded in `Mesh` with `blender::bke::MeshRuntime`. This has quite a few benefits: - It's possible to use C++ types like `std::mutex`, `Array`, `BitVector`, etc. more easily - Meshes saved in files are slightly smaller - Copying and writing meshes is a bit more obvious without clearing of runtime data, etc. The first is by far the most important. It will allows us to avoid a bunch of manual memory management boilerplate that is error-prone and annoying. It should also simplify future CoW improvements for runtime data. This patch doesn't change anything besides changing `mesh.runtime.data` to `mesh.runtime->data`. The cleanups above will happen separately. Differential Revision: https://developer.blender.org/D16180
This commit is contained in:
@@ -213,7 +213,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
||||
dtmd->defgrp_name,
|
||||
invert_vgroup,
|
||||
&reports)) {
|
||||
result->runtime.is_original_bmesh = false;
|
||||
result->runtime->is_original_bmesh = false;
|
||||
}
|
||||
|
||||
if (BKE_reports_contain(&reports, RPT_ERROR)) {
|
||||
|
||||
Reference in New Issue
Block a user