diff options
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 8 | ||||
-rw-r--r-- | source/creator/creator.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index d0341ab8c89..3742b45c6c0 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -129,10 +129,11 @@ enum { G_DEBUG_WM = (1 << 5), /* operator, undo */ G_DEBUG_JOBS = (1 << 6), /* jobs time profiling */ G_DEBUG_FREESTYLE = (1 << 7), /* freestyle messages */ + G_DEBUG_DEPSGRAPH = (1 << 8), /* depsgraph messages */ }; #define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \ - G_DEBUG_FREESTYLE) + G_DEBUG_FREESTYLE | G_DEBUG_DEPSGRAPH) /* G.fileflags */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6359c133886..dc20629b0d0 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2877,7 +2877,7 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx, /* XXX: should this case be OB_RECALC_OB instead? */ if (ob->recalc & OB_RECALC_ALL) { - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG_DEPSGRAPH) printf("recalcob %s\n", ob->id.name + 2); /* handle proxy copy for target */ @@ -2904,7 +2904,7 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx, Key *key; float ctime = BKE_scene_frame_get(scene); - if (G.debug & G_DEBUG) + if (G.debug & G_DEBUG_DEPSGRAPH) printf("recalcdata %s\n", ob->id.name + 2); if (adt) { diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 0c64896b28c..975e06467d4 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1263,7 +1263,7 @@ static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadi PRINT("Thread %d: update object %s\n", threadid, object->id.name); - if (G.debug & G_DEBUG) { + if (G.debug & G_DEBUG_DEPSGRAPH) { start_time = PIL_check_seconds_timer(); if (object->recalc & OB_RECALC_ALL) { @@ -1312,7 +1312,7 @@ static void print_threads_statistics(ThreadedObjectUpdateState *state) { int i, tot_thread; - if ((G.debug & G_DEBUG) == 0) { + if ((G.debug & G_DEBUG_DEPSGRAPH) == 0) { return; } @@ -1437,7 +1437,7 @@ static void scene_update_objects(EvaluationContext *eval_ctx, Main *bmain, Scene state.scene_parent = scene_parent; /* Those are only needed when blender is run with --debug argument. */ - if (G.debug & G_DEBUG) { + if (G.debug & G_DEBUG_DEPSGRAPH) { memset(state.statistics, 0, sizeof(state.statistics)); state.has_updated_objects = false; state.base_time = PIL_check_seconds_timer(); @@ -1453,7 +1453,7 @@ static void scene_update_objects(EvaluationContext *eval_ctx, Main *bmain, Scene BLI_task_pool_work_and_wait(task_pool); BLI_task_pool_free(task_pool); - if (G.debug & G_DEBUG) { + if (G.debug & G_DEBUG_DEPSGRAPH) { print_threads_statistics(&state); } diff --git a/source/creator/creator.c b/source/creator/creator.c index be8b2a4f135..7e592552e2c 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -313,6 +313,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) BLI_argsPrintArgDoc(ba, "--debug-memory"); BLI_argsPrintArgDoc(ba, "--debug-jobs"); BLI_argsPrintArgDoc(ba, "--debug-python"); + BLI_argsPrintArgDoc(ba, "--debug-depsgraph"); BLI_argsPrintArgDoc(ba, "--debug-wm"); BLI_argsPrintArgDoc(ba, "--debug-all"); @@ -1406,6 +1407,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 1, NULL, "--debug-value", "<value>\n\tSet debug value of <value> on startup\n", set_debug_value, NULL); BLI_argsAdd(ba, 1, NULL, "--debug-jobs", "\n\tEnable time profiling for background jobs.", debug_mode_generic, (void *)G_DEBUG_JOBS); + BLI_argsAdd(ba, 1, NULL, "--debug-depsgraph", "\n\tEnable debug messages from dependency graph", debug_mode_generic, (void *)G_DEBUG_DEPSGRAPH); BLI_argsAdd(ba, 1, NULL, "--verbose", "<verbose>\n\tSet logging verbosity level.", set_verbosity, NULL); |