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-01-29 14:31:05 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-29 14:31:05 +0400
commit37489d71c7f0007ffc3aa252a4cc63d1aa903399 (patch)
tree8d535c6ff229d8a30855a88a8cb3e2051e0485e8 /source/blender/modifiers/intern/MOD_triangulate.c
parent97a5cd92bc807a03c4983ec70b1b961491062b13 (diff)
Triangulate modifier no longer uses bmesh operator api call, instead add a BM_mesh_triangulate() function. Gives ~2x speedup in my tests on an optimized build.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_triangulate.c')
-rw-r--r--source/blender/modifiers/intern/MOD_triangulate.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c
index 645fd5eb2cf..2f0fbbd0507 100644
--- a/source/blender/modifiers/intern/MOD_triangulate.c
+++ b/source/blender/modifiers/intern/MOD_triangulate.c
@@ -33,8 +33,6 @@
#include "BKE_modifier.h"
#include "BKE_tessmesh.h"
-/* triangulation modifier, directly calls the bmesh operator */
-
static DerivedMesh *triangulate_dm(DerivedMesh *dm, const int flag)
{
DerivedMesh *result;
@@ -44,13 +42,7 @@ static DerivedMesh *triangulate_dm(DerivedMesh *dm, const int flag)
bm = DM_to_bmesh(dm);
- BM_mesh_elem_toolflags_ensure(bm);
- BMO_push(bm, NULL);
-
- BMO_op_callf(bm, BMO_FLAG_DEFAULTS,
- "triangulate faces=%af use_beauty=%b",
- (flag & MOD_TRIANGULATE_BEAUTY));
- BMO_pop(bm);
+ BM_mesh_triangulate(bm, (flag & MOD_TRIANGULATE_BEAUTY), false);
result = CDDM_from_bmesh(bm, FALSE);
BM_mesh_free(bm);