From b7bf20d9504127ec7c3d52bc8a1448d4a2bdc3bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Jul 2013 22:59:47 +0000 Subject: optimization: only calculate the normals for passing into derivedMesh foreachMappedVert/foreachMappedFaceCenter when needed, this means in editmode with wire draw, face and vertex normals don't have to be calculated at all. in most cases the normals are not used so add a flag that makes calculating them only for functions that need them. also fix face normal calculation for CDDM, was using quad calculation for ngons too. --- source/blender/editors/space_view3d/view3d_snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_view3d/view3d_snap.c') diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index fb7bbdaa178..a2dd7d510bd 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -343,7 +343,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod if (transvmain && em->derivedCage) { EDBM_index_arrays_ensure(em, BM_VERT); - em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata); + em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata, DM_FOREACH_NOP); } } else if (obedit->type == OB_ARMATURE) { -- cgit v1.2.3