diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-12 07:29:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-12 07:39:49 +0300 |
commit | f79856f9fb12d47d08e14a1e0edaee9e638362c0 (patch) | |
tree | e9dd1186517eec1289cef9fb1376fe2b29b9fb0e /source/blender/modifiers/intern/MOD_util.c | |
parent | 24d39620fb7299590220af8ea3cb4d61fdb0c9a2 (diff) |
Cleanup: minor changes to deform functions
- Use 'float (*)[3]' to avoid casts.
- Remove unnecessary float[3] copy in gpencil_deform_verts.
- Use MEM_SAFE_FREE
- Use const arguments.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 1aee545aa43..c6dff375109 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -169,12 +169,12 @@ void MOD_get_texture_coords(MappingInfoModifierData *dmd, } } -void MOD_previous_vcos_store(ModifierData *md, float (*vertexCos)[3]) +void MOD_previous_vcos_store(ModifierData *md, const float (*vert_coords)[3]) { while ((md = md->next) && md->type == eModifierType_Armature) { ArmatureModifierData *amd = (ArmatureModifierData *)md; - if (amd->multi && amd->prevCos == NULL) { - amd->prevCos = MEM_dupallocN(vertexCos); + if (amd->multi && amd->vert_coords_prev == NULL) { + amd->vert_coords_prev = MEM_dupallocN(vert_coords); } else { break; @@ -187,7 +187,7 @@ void MOD_previous_vcos_store(ModifierData *md, float (*vertexCos)[3]) Mesh *MOD_deform_mesh_eval_get(Object *ob, struct BMEditMesh *em, Mesh *mesh, - float (*vertexCos)[3], + const float (*vertexCos)[3], const int num_verts, const bool use_normals, const bool use_orco) |