diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_volume_to_mesh.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_volume_to_mesh.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index 41ed7ae983a..3bf5cf6ab5b 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -155,10 +155,10 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * return create_empty_mesh(input_mesh); } - Volume *volume = static_cast<Volume *>(vmmd->object->data); + const Volume *volume = static_cast<Volume *>(vmmd->object->data); BKE_volume_load(volume, DEG_get_bmain(ctx->depsgraph)); - VolumeGrid *volume_grid = BKE_volume_grid_find(volume, vmmd->grid_name); + const VolumeGrid *volume_grid = BKE_volume_grid_find_for_read(volume, vmmd->grid_name); if (volume_grid == nullptr) { BKE_modifier_set_error(ctx->object, md, "Cannot find '%s' grid", vmmd->grid_name); return create_empty_mesh(input_mesh); |