diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-11 17:30:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-11 17:30:03 +0300 |
commit | e301fcf8e72ac6539e770000880cd24d460fbd6e (patch) | |
tree | 5be12fc29330da28c7e16516e6f7877cdfdd58ad /source | |
parent | fa32cde8a82c2c1b3ada9387f5833586a42a4965 (diff) |
Commend timing prints for boolean
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_intersect.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index 5ff0fcd51bb..a1c2701a151 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -1652,7 +1652,7 @@ bool BM_mesh_intersect( } if (boolean_mode != BMESH_ISECT_BOOLEAN_NONE) { - MEM_freeN(looptri_coords); + MEM_freeN((void *)looptri_coords); /* no booleans, just free immediate */ BLI_bvhtree_free(tree_a); diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 03adf3c0901..8379d2823af 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -32,6 +32,7 @@ * \ingroup modifiers */ +// #ifdef DEBUG_TIME #define USE_BMESH #ifdef WITH_MOD_BOOLEAN # define USE_CARVE WITH_MOD_BOOLEAN @@ -61,8 +62,10 @@ #include "tools/bmesh_intersect.h" #endif +#ifdef DEBUG_TIME #include "PIL_time.h" #include "PIL_time_utildefines.h" +#endif static void copyData(ModifierData *md, ModifierData *target) { @@ -190,7 +193,9 @@ static DerivedMesh *applyModifier_bmesh( BMesh *bm; const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_DM(dm, dm_other); +#ifdef DEBUG_TIME TIMEIT_START(boolean_bmesh); +#endif bm = BM_mesh_create(&allocsize); DM_to_bmesh_ex(dm_other, bm, true); @@ -271,7 +276,9 @@ static DerivedMesh *applyModifier_bmesh( result->dirty |= DM_DIRTY_NORMALS; +#ifdef DEBUG_TIME TIMEIT_END(boolean_bmesh); +#endif return result; } @@ -315,12 +322,15 @@ static DerivedMesh *applyModifier_carve( result = get_quick_derivedMesh(derivedData, dm, bmd->operation); if (result == NULL) { +#ifdef DEBUG_TIME TIMEIT_START(boolean_carve); +#endif result = NewBooleanDerivedMesh(dm, bmd->object, derivedData, ob, 1 + bmd->operation); - +#ifdef DEBUG_TIME TIMEIT_END(boolean_carve); +#endif } /* if new mesh returned, return it; otherwise there was |