Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-28 04:29:47 +0300
committerCampbell Barton <campbell@blender.org>2022-03-28 06:41:31 +0300
commit6f305577b346030249bdb762f887136ff02624e3 (patch)
tree207b1cbba07e8a0f864ff854d6d1a74c26c6beaf /source/blender/modifiers/intern/MOD_surface.c
parent24839fdefa89339e77465c27d89c86cd5ac0cdd9 (diff)
Cleanup: use "num" as a suffix in: source/blender/modifiers
Also rename DNA struct members.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_surface.c')
-rw-r--r--source/blender/modifiers/intern/MOD_surface.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c
index 4ca2e67c334..f3811d98cd1 100644
--- a/source/blender/modifiers/intern/MOD_surface.c
+++ b/source/blender/modifiers/intern/MOD_surface.c
@@ -94,7 +94,7 @@ static void deformVerts(ModifierData *md,
const ModifierEvalContext *ctx,
Mesh *mesh,
float (*vertexCos)[3],
- int numVerts)
+ int verts_num)
{
SurfaceModifierData *surmd = (SurfaceModifierData *)md;
const int cfra = (int)DEG_get_ctime(ctx->depsgraph);
@@ -116,7 +116,7 @@ static void deformVerts(ModifierData *md,
surmd->mesh = (Mesh *)BKE_id_copy_ex(NULL, (ID *)mesh, NULL, LIB_ID_COPY_LOCALIZE);
}
else {
- surmd->mesh = MOD_deform_mesh_eval_get(ctx->object, NULL, NULL, NULL, numVerts, false, false);
+ surmd->mesh = MOD_deform_mesh_eval_get(ctx->object, NULL, NULL, NULL, verts_num, false, false);
}
if (!ctx->object->pd) {
@@ -125,7 +125,7 @@ static void deformVerts(ModifierData *md,
}
if (surmd->mesh) {
- uint numverts = 0, i = 0;
+ uint mesh_verts_num = 0, i = 0;
int init = 0;
float *vec;
MVert *x, *v;
@@ -133,9 +133,9 @@ static void deformVerts(ModifierData *md,
BKE_mesh_vert_coords_apply(surmd->mesh, vertexCos);
BKE_mesh_calc_normals(surmd->mesh);
- numverts = surmd->mesh->totvert;
+ mesh_verts_num = surmd->mesh->totvert;
- if (numverts != surmd->numverts || surmd->x == NULL || surmd->v == NULL ||
+ if (mesh_verts_num != surmd->verts_num || surmd->x == NULL || surmd->v == NULL ||
cfra != surmd->cfra + 1) {
if (surmd->x) {
MEM_freeN(surmd->x);
@@ -146,16 +146,16 @@ static void deformVerts(ModifierData *md,
surmd->v = NULL;
}
- surmd->x = MEM_calloc_arrayN(numverts, sizeof(MVert), "MVert");
- surmd->v = MEM_calloc_arrayN(numverts, sizeof(MVert), "MVert");
+ surmd->x = MEM_calloc_arrayN(mesh_verts_num, sizeof(MVert), "MVert");
+ surmd->v = MEM_calloc_arrayN(mesh_verts_num, sizeof(MVert), "MVert");
- surmd->numverts = numverts;
+ surmd->verts_num = mesh_verts_num;
init = 1;
}
/* convert to global coordinates and calculate velocity */
- for (i = 0, x = surmd->x, v = surmd->v; i < numverts; i++, x++, v++) {
+ for (i = 0, x = surmd->x, v = surmd->v; i < mesh_verts_num; i++, x++, v++) {
vec = surmd->mesh->mvert[i].co;
mul_m4_v3(ctx->object->obmat, vec);
@@ -210,7 +210,7 @@ static void blendRead(BlendDataReader *UNUSED(reader), ModifierData *md)
surmd->bvhtree = NULL;
surmd->x = NULL;
surmd->v = NULL;
- surmd->numverts = 0;
+ surmd->verts_num = 0;
}
ModifierTypeInfo modifierType_Surface = {