[Bf-blender-cvs] [582bc51] depsgraph_refactor: Added a settings struct for depsgraph statistics/logging/debug to user preferences.
Lukas Tönne
noreply at git.blender.org
Sun May 25 11:18:20 CEST 2014
Commit: 582bc51f159930675aad1200f46322f50323fbb4
Author: Lukas Tönne
Date: Fri May 23 17:16:14 2014 +0200
https://developer.blender.org/rB582bc51f159930675aad1200f46322f50323fbb4
Added a settings struct for depsgraph statistics/logging/debug to user
preferences.
Currently only has a generic "statistics" option, will be extended later.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 18f7c53..25b9ed5 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -267,6 +267,14 @@ class USERPREF_PT_edit(Panel):
col.prop(edit, "undo_steps", text="Steps")
col.prop(edit, "undo_memory_limit", text="Memory Limit")
+ col.separator()
+ col.separator()
+ col.separator()
+
+ depsgraph = edit.depsgraph_settings
+ col.label(text="Dependency Graph:")
+ col.prop(depsgraph, "use_statistics")
+
row.separator()
row.separator()
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 4f5670d..32267ae 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -413,6 +413,15 @@ typedef struct WalkNavigation {
short pad[3];
} WalkNavigation;
+typedef struct DepsgraphSettings {
+ int flag;
+ int pad;
+} DepsgraphSettings;
+
+typedef enum eDepsgraphSettings_Flag {
+ USER_DEG_STATS = (1 << 0), /* enable statistics */
+} eDepsgraphSettings_Flag;
+
typedef struct UserDef {
/* UserDef has separate do-version handling, and can be read from other files */
int versionfile, subversionfile;
@@ -528,6 +537,8 @@ typedef struct UserDef {
float pixelsize; /* private, set by GHOST, to multiply DPI with */
struct WalkNavigation walk_navigation;
+
+ struct DepsgraphSettings depsgraph_settings;
} UserDef;
extern UserDef U; /* from blenkernel blender.c */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 7c101fb..08bcfae 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3565,6 +3565,11 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object");
+
+ prop = RNA_def_property(srna, "depsgraph_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "DepsgraphSettings");
+ RNA_def_property_ui_text(prop, "Dependency Graph", "Settings for the dependency graph");
}
static void rna_def_userdef_system(BlenderRNA *brna)
@@ -4368,6 +4373,23 @@ static void rna_def_userdef_autoexec_path_collection(BlenderRNA *brna, PropertyR
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
}
+static void rna_def_userdef_depsgraph_settings(BlenderRNA *brna)
+{
+ PropertyRNA *prop;
+ StructRNA *srna;
+
+ srna = RNA_def_struct(brna, "DepsgraphSettings", NULL);
+ RNA_def_struct_sdna(srna, "DepsgraphSettings");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
+ RNA_def_struct_ui_text(srna, "Dependency Graph Settings", "");
+
+ /* Statistics */
+
+ prop = RNA_def_property(srna, "use_statistics", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DEG_STATS);
+ RNA_def_property_ui_text(prop, "Statistics", "Record dependency graph performance statistics");
+}
+
void RNA_def_userdef(BlenderRNA *brna)
{
StructRNA *srna;
@@ -4461,7 +4483,7 @@ void RNA_def_userdef(BlenderRNA *brna)
rna_def_userdef_addon(brna);
rna_def_userdef_addon_pref(brna);
rna_def_userdef_pathcompare(brna);
-
+ rna_def_userdef_depsgraph_settings(brna);
}
#endif
More information about the Bf-blender-cvs
mailing list