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/collada/collada_utils.cpp
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/collada/collada_utils.cpp')
-rw-r--r--source/blender/collada/collada_utils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 65d6a13dd18..7e9ecb95f7a 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -383,12 +383,13 @@ void bc_match_scale(std::vector<Object *> *objects_done,
}
-void bc_triangulate_mesh(Mesh *me) {
+void bc_triangulate_mesh(Mesh *me)
+{
bool use_beauty = false;
bool tag_only = false;
BMesh *bm = BM_mesh_create(&bm_mesh_allocsize_default);
- BM_mesh_bm_from_me(bm, me, FALSE, 0);
+ BM_mesh_bm_from_me(bm, me, true, false, 0);
BM_mesh_triangulate(bm, use_beauty, tag_only, NULL, NULL);
BM_mesh_bm_to_me(bm, me, FALSE);
BM_mesh_free(bm);