diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-18 13:57:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-18 13:57:06 +0300 |
commit | c3da1af01c1584a8e23b9c6875bcb784fec00ed5 (patch) | |
tree | 61e48addc8f47b0317d7a285541f64d855d4bbfb /source/blender/makesrna/intern/rna_rna.c | |
parent | 8c84a4338597b8b17bca5b1ffbe819f6d71fbf83 (diff) |
RNA minor changes
* Added start of lamp wrapping (code by Michael Fox).
* Add back Object.data, was crashing with unknown data type.
* Added support for using consecutive variables like float r, g, b;
as an array without writing a manual get/set function.
* Also note the RNA documentation is updated now to be more
about how to define RNA and use it, including some diagrams.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index aa39dbed531..e3d83e92964 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -424,14 +424,14 @@ static void rna_def_property(StructRNA *srna) RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_enum_items(prop, subtype_items); RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL); - RNA_def_property_ui_text(prop, "Sub Type", "Sub type indicating the interpretation of the property."); + RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property."); } static void rna_def_number_property(StructRNA *srna, PropertyType type) { PropertyRNA *prop; - prop= RNA_def_property(srna, "array_length", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "array_length", PROP_INT, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_int_funcs(prop, "rna_Property_array_length_get", NULL); RNA_def_property_ui_text(prop, "Array Length", "Maximum length of the array, 0 means unlimited."); @@ -463,14 +463,14 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type) else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_max_get", NULL); RNA_def_property_ui_text(prop, "Soft Maximum", "Maximum value used by buttons."); - prop= RNA_def_property(srna, "step", type, PROP_NONE); + prop= RNA_def_property(srna, "step", type, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_step_get", NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_step_get", NULL); RNA_def_property_ui_text(prop, "Step", "Step size used by number buttons, for floats 1/100th of the step size."); if(type == PROP_FLOAT) { - prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "precision", PROP_INT, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_int_funcs(prop, "rna_FloatProperty_precision_get", NULL); RNA_def_property_ui_text(prop, "Precision", "Number of digits after the dot used by buttons."); @@ -500,7 +500,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna) RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_identifier_get", "rna_EnumPropertyItem_identifier_length", NULL); RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting."); - prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "value", PROP_INT, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_int_funcs(prop, "rna_EnumPropertyItem_value_get", NULL); RNA_def_property_ui_text(prop, "Value", "Value of the item."); @@ -569,7 +569,7 @@ void RNA_def_rna(BlenderRNA *brna) srna= RNA_def_struct(brna, "StringProperty", "String Definition"); rna_def_property(srna); - prop= RNA_def_property(srna, "max_length", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "max_length", PROP_INT, PROP_UNSIGNED); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_int_funcs(prop, "rna_StringProperty_max_length_get", NULL); RNA_def_property_ui_text(prop, "Maximum Length", "Maximum length of the string, 0 means unlimited."); @@ -603,7 +603,7 @@ void rna_def_builtin_properties(StructRNA *srna) RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); RNA_def_property_pointer_funcs(prop, "rna_builtin_type_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Type", "RNA type definition."); + RNA_def_property_ui_text(prop, "RNA", "RNA type definition."); } #endif |