Commend timing prints for boolean

This commit is contained in:
Campbell Barton 2015-12-12 01:30:03 +11:00
parent fa32cde8a8
commit e301fcf8e7
2 changed files with 12 additions and 2 deletions

View File

@ -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);

View File

@ -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