diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-23 02:59:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-23 02:59:47 +0400 |
commit | b7bf20d9504127ec7c3d52bc8a1448d4a2bdc3bf (patch) | |
tree | a38041dec1c240652d0e22991489ab1255d35fd4 /source/blender/editors/space_view3d/view3d_snap.c | |
parent | 33e52d0df4d2d9dfd248144e2aac08af4c1bbeff (diff) |
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.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |