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:
authorCampbell Barton <ideasman42@gmail.com>2009-10-31 21:48:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-10-31 21:48:58 +0300
commitaf72bb50ae41f5ba1f9f5b2310b2aee77907fecf (patch)
treeeac2c8df182ba238758fb51b2292212326e1c7ac /source/blender/makesrna/intern/rna_ui.c
parente4881eef529262ec131ab22688e44fb9af2f0bb9 (diff)
improved class validation, variables defined by the rna interface as non-optional could fail silently when absent in the class. Set these to PROP_REGISTER_OPTIONAL and raise an error when others are not found.
last commit broke povray too.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 34b50e1b3ea..1bb7fe720a6 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -592,7 +592,6 @@ static void rna_def_panel(BlenderRNA *brna)
/* registration */
prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER);
@@ -612,15 +611,15 @@ static void rna_def_panel(BlenderRNA *brna)
prop= RNA_def_property(srna, "bl_context", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->context");
- RNA_def_property_flag(prop, PROP_REGISTER);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* should this be optional? - Campbell */
prop= RNA_def_property(srna, "bl_default_closed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_DEFAULT_CLOSED);
- RNA_def_property_flag(prop, PROP_REGISTER);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
prop= RNA_def_property(srna, "bl_show_header", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", PNL_NO_HEADER);
- RNA_def_property_flag(prop, PROP_REGISTER);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
}
static void rna_def_header(BlenderRNA *brna)
@@ -693,7 +692,6 @@ static void rna_def_menu(BlenderRNA *brna)
/* registration */
prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER);