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:
authorMartin Poirier <theeth@yahoo.com>2010-04-02 23:38:20 +0400
committerMartin Poirier <theeth@yahoo.com>2010-04-02 23:38:20 +0400
commit9a027080df135ade5d2237ffff299a0b1762910d (patch)
tree125cd65c3f4b45efc5a89fb2297e7d482e200618 /source/blender/makesrna/intern/rna_main.c
parentea5936db0c199676ff0df019e83cabce50af9511 (diff)
RNA Property debug in Main, mapped to G.f's G_DEBUG
Diffstat (limited to 'source/blender/makesrna/intern/rna_main.c')
-rw-r--r--source/blender/makesrna/intern/rna_main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index e51bea20f27..7a680e00c8b 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -33,8 +33,23 @@
#include "BKE_main.h"
#include "BKE_mesh.h"
+#include "BKE_global.h"
/* all the list begin functions are added manually here, Main is not in SDNA */
+static int rna_Main_debug_get(PointerRNA *ptr)
+{
+ return G.f & G_DEBUG;
+}
+
+
+static void rna_Main_debug_set(PointerRNA *ptr, const int value)
+{
+ if (value)
+ G.f |= G_DEBUG;
+ else
+ G.f &= ~G_DEBUG;
+}
+
static void rna_Main_filename_get(PointerRNA *ptr, char *value)
{
@@ -294,6 +309,11 @@ void RNA_def_main(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file");
+ prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_Main_debug_get", "rna_Main_debug_set");
+ RNA_def_property_ui_text(prop, "Debug", "Print debugging information in console");
+
+
for(i=0; lists[i].name; i++)
{
prop= RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);