[Bf-blender-cvs] [e02f6ed13d4] blender2.8: Pose path: skip time printing when not DEBUG_TIME
Dalai Felinto
noreply at git.blender.org
Sat Oct 13 00:54:57 CEST 2018
Commit: e02f6ed13d463dfa7ae86897a3f31b483653bb59
Author: Dalai Felinto
Date: Fri Oct 12 19:14:49 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBe02f6ed13d463dfa7ae86897a3f31b483653bb59
Pose path: skip time printing when not DEBUG_TIME
===================================================================
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 46e417f6452..f23f8b4c7c4 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -207,22 +207,34 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool curre
/* Override depsgraph with a filtered, simpler copy */
if (!current_frame_only && G.debug_value != -1) {
- TIMEIT_START(filter_pose_depsgraph);
DEG_FilterQuery query = {{0}};
DEG_FilterTarget *dft_ob = MEM_callocN(sizeof(DEG_FilterTarget), "DEG_FilterTarget");
dft_ob->id = &ob->id;
BLI_addtail(&query.targets, dft_ob);
+#ifdef DEBUG_TIME
+ TIMEIT_START(filter_pose_depsgraph);
+#endif
+
depsgraph = DEG_graph_filter(depsgraph, bmain, &query);
- free_depsgraph = true;
- MEM_freeN(dft_ob);
+#ifdef DEBUG_TIME
TIMEIT_END(filter_pose_depsgraph);
+#endif
+
+ free_depsgraph = true;
+ MEM_freeN(dft_ob);
+#ifdef DEBUG_TIME
TIMEIT_START(filter_pose_update);
+#endif
+
BKE_scene_graph_update_tagged(depsgraph, bmain);
+
+#ifdef DEBUG_TIME
TIMEIT_END(filter_pose_update);
+#endif
}
/* set flag to force recalc, then grab the relevant bones to target */
@@ -230,9 +242,15 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool curre
animviz_get_object_motionpaths(ob, &targets);
/* recalculate paths, then free */
+#ifdef DEBUG_TIME
TIMEIT_START(pose_path_calc);
+#endif
+
animviz_calc_motionpaths(depsgraph, bmain, scene, &targets, !free_depsgraph, current_frame_only);
+
+#ifdef DEBUG_TIME
TIMEIT_END(pose_path_calc);
+#endif
BLI_freelistN(&targets);
More information about the Bf-blender-cvs
mailing list