[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17917] branches/blender2.5/blender/source /blender/makesrna/intern/rna_rna.c: Use the identifier rather then the struct name to access a collection of structs .
Campbell Barton
ideasman42 at gmail.com
Thu Dec 18 06:28:18 CET 2008
Revision: 17917
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17917
Author: campbellbarton
Date: 2008-12-18 06:28:17 +0100 (Thu, 18 Dec 2008)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c 2008-12-18 02:56:48 UTC (rev 17916)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c 2008-12-18 05:28:17 UTC (rev 17917)
@@ -393,13 +393,13 @@
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");
More information about the Bf-blender-cvs
mailing list