diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-02 12:52:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-02 18:09:44 +0300 |
commit | bb75c4cbe9f54b643106a999a077d64b20f6d97a (patch) | |
tree | 68acfb67608c29da2ccdf1afb895a67794193ddd /source/blender/depsgraph/intern/depsgraph_intern.h | |
parent | 65e6654c85a5b2fd44444057e87bd36d6ee0597a (diff) |
Depsgraph: Make all print messages to respect per-depsgraph debug flags
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_intern.h')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_intern.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h index 9961723ed17..dda482efc8d 100644 --- a/source/blender/depsgraph/intern/depsgraph_intern.h +++ b/source/blender/depsgraph/intern/depsgraph_intern.h @@ -46,6 +46,8 @@ extern "C" { #include "intern/nodes/deg_node_operation.h" #include "intern/depsgraph.h" +#include "DEG_depsgraph_debug.h" + struct DEGEditorUpdateContext; struct Group; struct Main; @@ -112,7 +114,14 @@ void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool updated); -#define DEG_DEBUG_PRINTF(type, ...) \ +#define DEG_DEBUG_PRINTF(depsgraph, type, ...) \ + do { \ + if (DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_ ## type) { \ + fprintf(stderr, __VA_ARGS__); \ + } \ + } while (0) + +#define DEG_GLOBAL_DEBUG_PRINTF(type, ...) \ do { \ if (G.debug & G_DEBUG_DEPSGRAPH_ ## type) { \ fprintf(stderr, __VA_ARGS__); \ |