Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-03 03:20:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-03 03:20:49 +0400
commitdfad9b0c09eed2de2c3bedd64691bf11f637725c (patch)
tree86298761e9883ca7dc83b3b5a24a859bdd07bfce /source/blender/modifiers/intern/MOD_edgesplit.c
parent99b55ef6eb7d677ead66b4166afe45688147a5b3 (diff)
fix [#35555] Collada: export destroys mesh in some cases
add arguments to calculate normals when converting to bmesh: BM_mesh_bm_from_me, DM_to_bmesh This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
Diffstat (limited to 'source/blender/modifiers/intern/MOD_edgesplit.c')
-rw-r--r--source/blender/modifiers/intern/MOD_edgesplit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c
index 0c50d4d3323..d877932b81d 100644
--- a/source/blender/modifiers/intern/MOD_edgesplit.c
+++ b/source/blender/modifiers/intern/MOD_edgesplit.c
@@ -56,8 +56,9 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj
BMIter iter;
BMEdge *e;
float threshold = cosf((emd->split_angle + 0.00001f) * (float)M_PI / 180.0f);
+ const bool calc_face_normals = (emd->flags & MOD_EDGESPLIT_FROMANGLE) != 0;
- bm = DM_to_bmesh(dm);
+ bm = DM_to_bmesh(dm, calc_face_normals);
if (emd->flags & MOD_EDGESPLIT_FROMANGLE) {
BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) {