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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_boolean.c')
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 4152e8633e5..0513d3af13a 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -630,7 +630,15 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
Object *operand_ob = bmd->object;
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_INIT(operand_get_evaluated_mesh);
+ TIMEIT_BLOCK_START(operand_get_evaluated_mesh);
+#endif
mesh_operand_ob = BKE_modifier_get_evaluated_mesh_from_evaluated_object(operand_ob, false);
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_END(operand_get_evaluated_mesh);
+ TIMEIT_BLOCK_STATS(operand_get_evaluated_mesh);
+#endif
if (mesh_operand_ob) {
/* XXX This is utterly non-optimal, we may go from a bmesh to a mesh back to a bmesh!
@@ -642,11 +650,35 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
result = get_quick_mesh(object, mesh, operand_ob, mesh_operand_ob, bmd->operation);
if (result == NULL) {
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_INIT(object_BMD_mesh_bm_create);
+ TIMEIT_BLOCK_START(object_BMD_mesh_bm_create);
+#endif
bm = BMD_mesh_bm_create(mesh, object, mesh_operand_ob, operand_ob, &is_flip);
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_END(object_BMD_mesh_bm_create);
+ TIMEIT_BLOCK_STATS(object_BMD_mesh_bm_create);
+#endif
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_INIT(BMD_mesh_intersection);
+ TIMEIT_BLOCK_START(BMD_mesh_intersection);
+#endif
BMD_mesh_intersection(bm, md, ctx, mesh_operand_ob, object, operand_ob, is_flip);
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_END(BMD_mesh_intersection);
+ TIMEIT_BLOCK_STATS(BMD_mesh_intersection);
+#endif
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_INIT(BKE_mesh_from_bmesh_for_eval_nomain);
+ TIMEIT_BLOCK_START(BKE_mesh_from_bmesh_for_eval_nomain);
+#endif
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, mesh);
+#ifdef DEBUG_TIME
+ TIMEIT_BLOCK_END(BKE_mesh_from_bmesh_for_eval_nomain);
+ TIMEIT_BLOCK_STATS(BKE_mesh_from_bmesh_for_eval_nomain);
+#endif
BM_mesh_free(bm);
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
}