[Bf-blender-cvs] [e301fcf] master: Commend timing prints for boolean

Campbell Barton noreply at git.blender.org
Fri Dec 11 15:37:15 CET 2015


Commit: e301fcf8e72ac6539e770000880cd24d460fbd6e
Author: Campbell Barton
Date:   Sat Dec 12 01:30:03 2015 +1100
Branches: master
https://developer.blender.org/rBe301fcf8e72ac6539e770000880cd24d460fbd6e

Commend timing prints for boolean

===================================================================

M	source/blender/bmesh/tools/bmesh_intersect.c
M	source/blender/modifiers/intern/MOD_boolean.c

===================================================================

diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index 5ff0fcd..a1c2701 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 03adf3c..8379d28 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




More information about the Bf-blender-cvs mailing list