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>2008-12-19 07:06:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-12-19 07:06:24 +0300
commit04428d6750d7309d7c7436c65b465f2b51d3d6a2 (patch)
tree683c884c3c3986f8dcab09e3207b4a7743a5e1b5 /source/blender/makesrna/intern/rna_ID.c
parentd9de6fca6cda2a7ddeeb936692b529182a14dec9 (diff)
added "description" and "readonly" properties to RNA Structs (also accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index fed87bc4638..dc36349e19b 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -106,7 +106,9 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* this is struct is used for holding the virtual
* PropertyRNA's for ID properties */
- srna= RNA_def_struct(brna, "IDProperty", NULL, "ID Property");
+ srna= RNA_def_struct(brna, "IDProperty", NULL);
+ RNA_def_struct_ui_text(srna, "ID Property", "stores arbitrary properties");
+
/* IDP_STRING */
prop= RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
@@ -146,7 +148,8 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* ID property groups > level 0, since level 0 group is merged
* with native RNA properties. the builtin_properties will take
* care of the properties here */
- srna= RNA_def_struct(brna, "IDPropertyGroup", NULL, "ID Property Group");
+ srna= RNA_def_struct(brna, "IDPropertyGroup", NULL);
+ RNA_def_struct_ui_text(srna, "ID Property Group", "a collection of properties");
}
static void rna_def_ID(BlenderRNA *brna)
@@ -154,7 +157,9 @@ static void rna_def_ID(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ID", NULL, "ID");
+ srna= RNA_def_struct(brna, "ID", NULL);
+ RNA_def_struct_ui_text(srna, "ID", "Used as a basis for dealing with many types with unique names, garbage collection and linked libraries");
+
RNA_def_struct_flag(srna, STRUCT_ID);
RNA_def_struct_funcs(srna, NULL, "rna_ID_refine");
@@ -186,7 +191,8 @@ static void rna_def_library(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Library", "ID", "Library");
+ srna= RNA_def_struct(brna, "Library", "ID");
+ RNA_def_struct_ui_text(srna, "Library", "reference to an external blend file");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
@@ -195,8 +201,11 @@ static void rna_def_library(BlenderRNA *brna)
}
void RNA_def_ID(BlenderRNA *brna)
{
+ StructRNA *srna;
/* simple built-in unknown type */
- RNA_def_struct(brna, "UnknownType", NULL, "Unknown Type");
+ srna= RNA_def_struct(brna, "UnknownType", NULL);
+ RNA_def_struct_ui_text(srna, "Unknown Type", "");
+
rna_def_ID(brna);
rna_def_ID_properties(brna);