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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-03-16 13:14:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-03-16 13:14:38 +0300
commit3baf31e73a7176fac8081b6648ce768b9504c2b1 (patch)
tree538b169e0dea4b949e5dd8b5a39b9db786955d3e /source/blender/blenkernel/intern/rigidbody.c
parent5de9c8f6f0f5157251b8f9f103455ba7f3bf826a (diff)
Depsgraph: Move evaluation debug prints to depsgraph
This way we can easily control format and keep it consistent. And also possibly do other trickery, like coloring addresses!
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 56e65b6f2c5..c10f54a99eb 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -66,6 +66,8 @@
#include "BKE_rigidbody.h"
#include "BKE_scene.h"
+#include "DEG_depsgraph.h"
+
/* ************************************** */
/* Memory Management */
@@ -1689,11 +1691,7 @@ void BKE_rigidbody_rebuild_sim(EvaluationContext *UNUSED(eval_ctx),
Scene *scene)
{
float ctime = BKE_scene_frame_get(scene);
-
- if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) {
- printf("%s at %f\n", __func__, ctime);
- }
-
+ DEG_debug_print_eval_time(__func__, scene->id.name, scene, ctime);
/* rebuild sim data (i.e. after resetting to start of timeline) */
if (BKE_scene_check_rigidbody_active(scene)) {
BKE_rigidbody_rebuild_world(scene, ctime);
@@ -1704,11 +1702,7 @@ void BKE_rigidbody_eval_simulation(EvaluationContext *UNUSED(eval_ctx),
Scene *scene)
{
float ctime = BKE_scene_frame_get(scene);
-
- if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) {
- printf("%s at %f\n", __func__, ctime);
- }
-
+ DEG_debug_print_eval_time(__func__, scene->id.name, scene, ctime);
/* evaluate rigidbody sim */
if (BKE_scene_check_rigidbody_active(scene)) {
BKE_rigidbody_do_simulation(scene, ctime);
@@ -1721,11 +1715,7 @@ void BKE_rigidbody_object_sync_transforms(EvaluationContext *UNUSED(eval_ctx),
{
RigidBodyWorld *rbw = scene->rigidbody_world;
float ctime = BKE_scene_frame_get(scene);
-
- if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) {
- printf("%s on %s\n", __func__, ob->id.name);
- }
-
+ DEG_debug_print_eval_time(__func__, ob->id.name, ob, ctime);
/* read values pushed into RBO from sim/cache... */
BKE_rigidbody_sync_transforms(rbw, ob, ctime);
}