Cleanup: Use const for edit mesh deformation arguments

This commit is contained in:
Hans Goudey
2024-05-20 10:11:13 -04:00
parent 9e019c33fc
commit 9b1c6fb04b
15 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -688,7 +688,7 @@ void BKE_armature_deform_coords_with_editmesh(const Object *ob_arm,
int deformflag,
float (*vert_coords_prev)[3],
const char *defgrp_name,
BMEditMesh *em_target);
const BMEditMesh *em_target);
/** \} */
+1 -1
View File
@@ -423,7 +423,7 @@ void BKE_curve_deform_coords_with_editmesh(const Object *ob_curve,
int defgrp_index,
short flag,
short defaxis,
BMEditMesh *em_target);
const BMEditMesh *em_target);
/**
* \param orco: Input vec and orco = local coord in curve space
+1 -1
View File
@@ -106,6 +106,6 @@ void BKE_lattice_deform_coords_with_editmesh(const Object *ob_lattice,
short flag,
const char *defgrp_name,
float fac,
BMEditMesh *em_target);
const BMEditMesh *em_target);
/** \} */
@@ -65,7 +65,7 @@ Mesh *mesh_create_eval_no_deform_render(Depsgraph *depsgraph,
Object *ob,
const CustomData_MeshMasks *dataMask);
void BKE_mesh_runtime_eval_to_meshkey(Mesh *me_deformed, Mesh *mesh, KeyBlock *kb);
void BKE_mesh_runtime_eval_to_meshkey(const Mesh *me_deformed, Mesh *mesh, KeyBlock *kb);
#ifndef NDEBUG
bool BKE_mesh_runtime_is_valid(Mesh *mesh_eval);
+3 -3
View File
@@ -223,14 +223,14 @@ struct ModifierTypeInfo {
*/
void (*deform_verts_EM)(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions);
/* Set deform matrix per vertex for crazy-space correction */
void (*deform_matrices_EM)(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions,
blender::MutableSpan<blender::float3x3> matrices);
@@ -578,7 +578,7 @@ void BKE_modifier_deform_verts(ModifierData *md,
void BKE_modifier_deform_vertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions);
@@ -238,7 +238,7 @@ void DM_release(DerivedMesh *dm)
MEM_SAFE_FREE(dm->face_offsets);
}
void BKE_mesh_runtime_eval_to_meshkey(Mesh *me_deformed, Mesh *mesh, KeyBlock *kb)
void BKE_mesh_runtime_eval_to_meshkey(const Mesh *me_deformed, Mesh *mesh, KeyBlock *kb)
{
/* Just a shallow wrapper around #BKE_keyblock_convert_from_mesh,
* that ensures both evaluated mesh and original one has same number of vertices. */
@@ -489,7 +489,7 @@ static void armature_deform_coords_impl(const Object *ob_arm,
const char *defgrp_name,
blender::Span<MDeformVert> dverts,
const Mesh *me_target,
BMEditMesh *em_target,
const BMEditMesh *em_target,
bGPDstroke *gps_target)
{
const bArmature *arm = static_cast<const bArmature *>(ob_arm->data);
@@ -710,7 +710,7 @@ void BKE_armature_deform_coords_with_editmesh(const Object *ob_arm,
int deformflag,
float (*vert_coords_prev)[3],
const char *defgrp_name,
BMEditMesh *em_target)
const BMEditMesh *em_target)
{
armature_deform_coords_impl(ob_arm,
ob_target,
@@ -204,7 +204,7 @@ static void curve_deform_coords_impl(const Object *ob_curve,
const int defgrp_index,
const short flag,
const short defaxis,
BMEditMesh *em_target)
const BMEditMesh *em_target)
{
Curve *cu;
int a;
@@ -391,7 +391,7 @@ void BKE_curve_deform_coords_with_editmesh(const Object *ob_curve,
const int defgrp_index,
const short flag,
const short defaxis,
BMEditMesh *em_target)
const BMEditMesh *em_target)
{
curve_deform_coords_impl(ob_curve,
ob_target,
@@ -340,7 +340,7 @@ static void lattice_deform_coords_impl(const Object *ob_lattice,
const char *defgrp_name,
const float fac,
const Mesh *me_target,
BMEditMesh *em_target)
const BMEditMesh *em_target)
{
LatticeDeformData *lattice_deform_data;
const MDeformVert *dvert = nullptr;
@@ -460,7 +460,7 @@ void BKE_lattice_deform_coords_with_editmesh(const Object *ob_lattice,
const short flag,
const char *defgrp_name,
const float fac,
BMEditMesh *em_target)
const BMEditMesh *em_target)
{
lattice_deform_coords_impl(ob_lattice,
ob_target,
+1 -1
View File
@@ -930,7 +930,7 @@ void BKE_modifier_deform_verts(ModifierData *md,
void BKE_modifier_deform_vertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
@@ -139,7 +139,7 @@ static void deform_verts(ModifierData *md,
static void deform_verts_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
@@ -169,7 +169,7 @@ static void deform_verts_EM(ModifierData *md,
static void deform_matrices_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh * /*mesh*/,
blender::MutableSpan<blender::float3> positions,
blender::MutableSpan<blender::float3x3> matrices)
+1 -1
View File
@@ -116,7 +116,7 @@ static void deform_verts(ModifierData *md,
static void deform_verts_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
+2 -2
View File
@@ -266,7 +266,7 @@ static void deformVerts_do(HookModifierData *hmd,
const ModifierEvalContext * /*ctx*/,
Object *ob,
Mesh *mesh,
BMEditMesh *em,
const BMEditMesh *em,
blender::MutableSpan<blender::float3> positions)
{
Object *ob_target = hmd->object;
@@ -430,7 +430,7 @@ static void deform_verts(ModifierData *md,
static void deform_verts_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
@@ -107,7 +107,7 @@ static void deform_verts(ModifierData *md,
static void deform_verts_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
const BMEditMesh *em,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
@@ -69,7 +69,7 @@ static void deform_matrices(ModifierData *md,
static void deform_verts_EM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh * /*em*/,
const BMEditMesh * /*em*/,
Mesh *mesh,
blender::MutableSpan<blender::float3> positions)
{
@@ -82,7 +82,7 @@ static void deform_verts_EM(ModifierData *md,
static void deform_matrices_EM(ModifierData * /*md*/,
const ModifierEvalContext *ctx,
BMEditMesh * /*em*/,
const BMEditMesh * /*em*/,
Mesh * /*mesh*/,
blender::MutableSpan<blender::float3> /*positions*/,
blender::MutableSpan<blender::float3x3> matrices)