Blender  V2.93
DEG_depsgraph_debug.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2014 Blender Foundation.
17  * All rights reserved.
18  */
19 
26 #pragma once
27 
28 #include <stdio.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 struct Depsgraph;
35 struct Scene;
36 struct ViewLayer;
37 
38 /* ------------------------------------------------ */
39 
40 /* NOTE: Those flags are same bitmask as G.debug_flags */
41 
42 void DEG_debug_flags_set(struct Depsgraph *depsgraph, int flags);
44 
45 void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name);
46 const char *DEG_debug_name_get(struct Depsgraph *depsgraph);
47 
48 /* ------------------------------------------------ */
49 
50 void DEG_stats_simple(const struct Depsgraph *graph,
51  size_t *r_outer,
52  size_t *r_operations,
53  size_t *r_relations);
54 
55 /* ************************************************ */
56 /* Diagram-Based Graph Debugging */
57 
58 void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *fp, const char *label);
59 
61  FILE *fp,
62  const char *label,
63  const char *output_filename);
64 
65 /* ************************************************ */
66 
67 /* Compare two dependency graphs. */
68 bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2);
69 
70 /* Check that dependencies in the graph are really up to date. */
72  struct Main *bmain,
73  struct Scene *scene,
74  struct ViewLayer *view_layer);
75 
76 /* Perform consistency check on the graph. */
78 
79 #ifdef __cplusplus
80 } /* extern "C" */
81 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
bool DEG_debug_graph_relations_validate(struct Depsgraph *graph, struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
void DEG_debug_flags_set(struct Depsgraph *depsgraph, int flags)
void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *fp, const char *label)
bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2)
int DEG_debug_flags_get(const struct Depsgraph *depsgraph)
void DEG_stats_simple(const struct Depsgraph *graph, size_t *r_outer, size_t *r_operations, size_t *r_relations)
bool DEG_debug_consistency_check(struct Depsgraph *graph)
void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name)
const char * DEG_debug_name_get(struct Depsgraph *depsgraph)
void DEG_debug_stats_gnuplot(const struct Depsgraph *graph, FILE *fp, const char *label, const char *output_filename)
Depsgraph * graph
const char * output_filename
const char * label
Scene scene
const Depsgraph * depsgraph
Definition: BKE_main.h:116
char name[64]