diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-21 23:28:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-21 23:48:10 +0300 |
commit | 189aa32a3ac0e949275d16ffb19576a1306d1780 (patch) | |
tree | ff75826925b4b26f6b4aa8928fe3c5d3c799a98f /source/blender/modifiers/intern/MOD_weightvgproximity.c | |
parent | 4a2d1953f3ca3e1160a3ce767df15e481658bdf6 (diff) |
Cleanup: vertex coordinate access, naming & minor changes
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgproximity.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvgproximity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 86d1b310d0c..95b15b4a924 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -492,7 +492,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes /* Get our vertex coordinates. */ if (numIdx != numVerts) { - float(*tv_cos)[3] = BKE_mesh_vertexCos_get(mesh, NULL); + float(*tv_cos)[3] = BKE_mesh_vert_coords_alloc(mesh, NULL); v_cos = MEM_malloc_arrayN(numIdx, sizeof(float[3]), "WeightVGProximity Modifier, v_cos"); for (i = 0; i < numIdx; i++) { copy_v3_v3(v_cos[i], tv_cos[indices[i]]); @@ -500,7 +500,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes MEM_freeN(tv_cos); } else { - v_cos = BKE_mesh_vertexCos_get(mesh, NULL); + v_cos = BKE_mesh_vert_coords_alloc(mesh, NULL); } /* Compute wanted distances. */ |