From 189aa32a3ac0e949275d16ffb19576a1306d1780 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 Aug 2019 06:28:35 +1000 Subject: 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. --- source/blender/modifiers/intern/MOD_correctivesmooth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_correctivesmooth.c') diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index be1580f0d70..a234f468e45 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -635,12 +635,12 @@ static void correctivesmooth_modifier_do(ModifierData *md, if (csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) { /* caller needs to do sanity check here */ csmd->bind_coords_num = numVerts; - rest_coords = (const float(*)[3])csmd->bind_coords; + rest_coords = csmd->bind_coords; } else { int me_numVerts; - rest_coords = (const float(*)[3])((em) ? BKE_editmesh_vertexCos_get_orco(em, &me_numVerts) : - BKE_mesh_vertexCos_get(ob->data, &me_numVerts)); + rest_coords = em ? BKE_editmesh_vert_coords_alloc_orco(em, &me_numVerts) : + BKE_mesh_vert_coords_alloc(ob->data, &me_numVerts); BLI_assert((unsigned int)me_numVerts == numVerts); is_rest_coords_alloc = true; -- cgit v1.2.3