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:
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug.cc4
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug.h11
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc1
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h10
4 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug.cc b/source/blender/depsgraph/intern/debug/deg_debug.cc
index b811f11f721..b8db18c9958 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug.cc
@@ -32,6 +32,10 @@
namespace DEG {
+DepsgraphDebug::DepsgraphDebug() : flags(G.debug)
+{
+}
+
bool terminal_do_color(void)
{
return (G.debug & G_DEBUG_DEPSGRAPH_PRETTY) != 0;
diff --git a/source/blender/depsgraph/intern/debug/deg_debug.h b/source/blender/depsgraph/intern/debug/deg_debug.h
index 3e4da644641..90a2f7a25fd 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug.h
+++ b/source/blender/depsgraph/intern/debug/deg_debug.h
@@ -31,6 +31,17 @@
namespace DEG {
+struct DepsgraphDebug {
+ DepsgraphDebug();
+
+ /* NOTE: Corresponds to G_DEBUG_DEPSGRAPH_* flags. */
+ int flags;
+
+ /* Name of this dependency graph (is used for debug prints, helping to distinguish graphs
+ * created for different view layer). */
+ string name;
+};
+
#define DEG_DEBUG_PRINTF(depsgraph, type, ...) \
do { \
if (DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_##type) { \
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 0e929f4e8b6..7e26857e440 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -83,7 +83,6 @@ Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluati
BLI_spin_init(&lock);
id_hash = BLI_ghash_ptr_new("Depsgraph id hash");
entry_tags = BLI_gset_ptr_new("Depsgraph entry_tags");
- debug.flags = G.debug;
memset(id_type_updated, 0, sizeof(id_type_updated));
memset(id_type_exist, 0, sizeof(id_type_exist));
memset(physics_relations, 0, sizeof(physics_relations));
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 89c5af9c798..a7ee5612af4 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -40,6 +40,7 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_physics.h"
+#include "intern/debug/deg_debug.h"
#include "intern/depsgraph_type.h"
struct GHash;
@@ -156,14 +157,7 @@ struct Depsgraph {
* to read stuff from. */
bool is_active;
- struct {
- /* NOTE: Corresponds to G_DEBUG_DEPSGRAPH_* flags. */
- int flags;
-
- /* Name of this dependency graph (is used for debug prints, helping to distinguish graphs
- * created for different view layer). */
- string name;
- } debug;
+ DepsgraphDebug debug;
bool is_evaluating;