Depsgraph: Refactor, wrap debug fields into own structure
This commit is contained in:
parent
726c7ba632
commit
3401b070b8
|
@ -82,7 +82,7 @@ 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;
|
||||
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));
|
||||
|
|
|
@ -194,9 +194,14 @@ struct Depsgraph {
|
|||
* to read stuff from. */
|
||||
bool is_active;
|
||||
|
||||
/* NOTE: Corresponds to G_DEBUG_DEPSGRAPH_* flags. */
|
||||
int debug_flags;
|
||||
string debug_name;
|
||||
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;
|
||||
|
||||
bool is_evaluating;
|
||||
|
||||
|
|
|
@ -47,25 +47,25 @@ extern "C" {
|
|||
void DEG_debug_flags_set(Depsgraph *depsgraph, int flags)
|
||||
{
|
||||
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
|
||||
deg_graph->debug_flags = flags;
|
||||
deg_graph->debug.flags = flags;
|
||||
}
|
||||
|
||||
int DEG_debug_flags_get(const Depsgraph *depsgraph)
|
||||
{
|
||||
const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(depsgraph);
|
||||
return deg_graph->debug_flags;
|
||||
return deg_graph->debug.flags;
|
||||
}
|
||||
|
||||
void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name)
|
||||
{
|
||||
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
|
||||
deg_graph->debug_name = name;
|
||||
deg_graph->debug.name = name;
|
||||
}
|
||||
|
||||
const char *DEG_debug_name_get(struct Depsgraph *depsgraph)
|
||||
{
|
||||
const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(depsgraph);
|
||||
return deg_graph->debug_name.c_str();
|
||||
return deg_graph->debug.name.c_str();
|
||||
}
|
||||
|
||||
bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2)
|
||||
|
|
Loading…
Reference in New Issue