diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-10-31 16:31:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-10-31 16:31:23 +0300 |
commit | ea265fc69702566a846be3005d9fd814a10d7d54 (patch) | |
tree | 011f35edde76ca7519c6e4bfc9acb01c0d39774e /source/blender/makesrna/intern/rna_ui.c | |
parent | 85eb9d6a2f0a0d94f795fc5264670e85ad56992f (diff) |
change blender python interface for classes not to ise __idname__ rather bl_idname since __somename__ is for pythons internal use.
replacements...
"__idname__" -> "bl_idname"
"__props__" -> "bl_props"
"__label__" -> "bl_label"
"__register__" -> "bl_register"
"__undo__" -> "bl_undo"
"__space_type__" -> "bl_space_type"
"__default_closed__" -> "bl_default_closed"
"__region_type__" -> "bl_region_type"
"__context__" -> "bl_context"
"__show_header__" -> "bl_show_header"
"__URL__" -> "_url"
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 8d6a18dd9c2..34b50e1b3ea 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -591,33 +591,34 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "drawname"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + 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); - prop= RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->region_type"); RNA_def_property_enum_items(prop, region_type_items); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "context", PROP_STRING, PROP_NONE); + 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); - prop= RNA_def_property(srna, "default_closed", PROP_BOOLEAN, PROP_NONE); + 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); - prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE); + 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); } @@ -647,11 +648,11 @@ static void rna_def_header(BlenderRNA *brna) RNA_def_property_struct_type(prop, "UILayout"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); @@ -691,11 +692,12 @@ static void rna_def_menu(BlenderRNA *brna) RNA_def_property_struct_type(prop, "UILayout"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + 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); - prop= RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); |