Commit: 0fdd058991afe68d4cabd60b8d936b6ae8266524
Author: Joshua Leung
Date:   Thu Aug 2 14:46:15 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB0fdd058991afe68d4cabd60b8d936b6ae8266524

Dev Tooling: Instrument motion path calculation operator (for bones) to collect 
timing data

This will be useful for checking on the progress of our optimisation
efforts, and to generate some nice stats for later.

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

M       source/blender/editors/armature/pose_edit.c

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

diff --git a/source/blender/editors/armature/pose_edit.c 
b/source/blender/editors/armature/pose_edit.c
index 1dfb9ec984a..a2cd3c57101 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -70,6 +70,15 @@
 
 #include "armature_intern.h"
 
+
+#define DEBUG_TIME
+
+#include "PIL_time.h"
+#ifdef DEBUG_TIME
+#  include "PIL_time_utildefines.h"
+#endif
+
+
 /* matches logic with ED_operator_posemode_context() */
 Object *ED_pose_object_from_context(bContext *C)
 {
@@ -256,10 +265,18 @@ static int pose_calculate_paths_exec(bContext *C, 
wmOperator *op)
        }
        CTX_DATA_END;
 
+#ifdef DEBUG_TIME
+       TIMEIT_START(recalc_pose_paths);
+#endif
+
        /* calculate the bones that now have motionpaths... */
        /* TODO: only make for the selected bones? */
        ED_pose_recalculate_paths(C, scene, ob);
 
+#ifdef DEBUG_TIME
+       TIMEIT_END(recalc_pose_paths);
+#endif
+
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to