diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-12-18 08:28:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-12-18 08:28:17 +0300 |
commit | a196d283ed4d45d5cfd06b8caecab36e9b43e260 (patch) | |
tree | e54d9d6ccefe879ad519528dbaa12dd61dbd1be8 | |
parent | ecc4e55b6666bdb20ed8e2e8e9a7fc2fbeff3731 (diff) |
Use the identifier rather then the struct name to access a collection of structs.
bpydoc.structs.keys() - ['Actuator', 'ActuatorSensor', 'AlwaysSensor', 'AndController'.... etc
now reads...
bpydoc.structs.keys() - ['Actuator', 'Actuator Sensor', 'Always Sensor', 'And Controller'...
This is more correct since an identifier is supposted to be unique when a name might not be.
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index c69fb968d18..08f7120bfd5 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -393,13 +393,13 @@ static void rna_def_struct(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_name_get", "rna_Struct_name_length", NULL); RNA_def_property_ui_text(prop, "Name", "Human readable name."); - RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_identifier_get", "rna_Struct_identifier_length", NULL); RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting."); - + RNA_def_struct_name_property(srna, prop); + prop= RNA_def_property(srna, "from", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); |