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:
authorJoshua Leung <aligorith@gmail.com>2018-08-02 05:46:15 +0300
committerJoshua Leung <aligorith@gmail.com>2018-08-02 06:04:58 +0300
commit0fdd058991afe68d4cabd60b8d936b6ae8266524 (patch)
treefd38db2d984ad8bbe0049d134cbc28df99fdefd7 /source/blender/editors/armature
parent8a0760eba2fe8ce31b0d054c498e9a264795c2b4 (diff)
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.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/pose_edit.c17
1 files changed, 17 insertions, 0 deletions
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);