Cleanup: Remove unnecessary clearing of mesh runtime data
The calls in the remesh operator were unnecessary because the mesh is about to be replaced anyway, and nothing invalidates the caches, and the call in BMesh -> Mesh conversion was unnecessary because the caches are cleared at the top of the function already.
This commit is contained in:
parent
90fb1cc4e6
commit
c8c14d1681
|
@ -1203,9 +1203,6 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
|
|||
|
||||
/* Topology could be changed, ensure #CD_MDISPS are ok. */
|
||||
multires_topology_changed(me);
|
||||
|
||||
/* To be removed as soon as COW is enabled by default. */
|
||||
BKE_mesh_runtime_clear_geometry(me);
|
||||
}
|
||||
|
||||
/* NOTE: The function is called from multiple threads with the same input BMesh and different
|
||||
|
|
|
@ -157,11 +157,6 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
|
|||
new_mesh = mesh_fixed_poles;
|
||||
}
|
||||
|
||||
if (mesh->flag & ME_REMESH_REPROJECT_VOLUME || mesh->flag & ME_REMESH_REPROJECT_PAINT_MASK ||
|
||||
mesh->flag & ME_REMESH_REPROJECT_SCULPT_FACE_SETS) {
|
||||
BKE_mesh_runtime_clear_geometry(mesh);
|
||||
}
|
||||
|
||||
if (mesh->flag & ME_REMESH_REPROJECT_VOLUME) {
|
||||
BKE_shrinkwrap_remesh_target_project(new_mesh, mesh, ob);
|
||||
}
|
||||
|
@ -175,7 +170,6 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
if (mesh->flag & ME_REMESH_REPROJECT_VERTEX_COLORS) {
|
||||
BKE_mesh_runtime_clear_geometry(mesh);
|
||||
BKE_remesh_reproject_vertex_paint(new_mesh, mesh);
|
||||
}
|
||||
|
||||
|
@ -900,7 +894,6 @@ static void quadriflow_start_job(void *customdata, bool *stop, bool *do_update,
|
|||
}
|
||||
|
||||
if (qj->preserve_paint_mask) {
|
||||
BKE_mesh_runtime_clear_geometry(mesh);
|
||||
BKE_mesh_remesh_reproject_paint_mask(new_mesh, mesh);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue