Cleanup: Use const variables for object's evaluated mesh

Generally the evaluated mesh should not be changed, since that is the
job of the modifier stack. Current code is far from const correct in
that regard. This commit uses a const variable for the reult of
`BKE_object_get_evaluated_mesh` in some cases. The most common
remaining case is retrieving a BVH tree from the mesh.
This commit is contained in:
2021-07-01 23:03:09 -05:00
parent 016a2707f5
commit 9f5c0ffb5e
13 changed files with 42 additions and 39 deletions

View File

@@ -1052,7 +1052,7 @@ GPUBatch *DRW_mesh_batch_cache_get_surface_sculpt(Mesh *me)
return cache->batch.surface;
}
int DRW_mesh_material_count_get(Mesh *me)
int DRW_mesh_material_count_get(const Mesh *me)
{
return mesh_render_mat_len_get(me);
}