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>2009-08-16 19:46:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-16 19:46:09 +0400
commit5555ef8a767de8a45c69c2b390032beb8a56479c (patch)
tree6e4557233dda42f57af79e3d95849fbf27562d52 /source/blender/makesrna
parent0e06b0bdf109ab69d406a72654c37b0f6ce377e6 (diff)
rna function return values in generated docs,
added prop.use_return so you can tell if a prop is a return value.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access.c5
-rw-r--r--source/blender/makesrna/intern/rna_rna.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 0ddbfb46f81..2de59586611 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1989,9 +1989,10 @@ void rna_iterator_array_end(CollectionPropertyIterator *iter)
{
ArrayIterator *internal= iter->internal;
- if(internal->free_ptr)
+ if(internal->free_ptr) {
MEM_freeN(internal->free_ptr);
-
+ internal->free_ptr= NULL;
+ }
MEM_freeN(iter->internal);
iter->internal= NULL;
}
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 54f3cc23458..57ed5ccef39 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -420,6 +420,12 @@ static int rna_Property_editable_get(PointerRNA *ptr)
return RNA_property_editable(ptr, prop);
}
+static int rna_Property_use_return_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ return prop->flag & PROP_RETURN ? 1:0;
+}
+
static int rna_Property_array_length_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -848,6 +854,11 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL);
RNA_def_property_ui_text(prop, "Editable", "Property is editable through RNA.");
+ prop= RNA_def_property(srna, "use_return", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_use_return_get", NULL);
+ RNA_def_property_ui_text(prop, "Return", "True when this property is a return value from an rna function..");
+
prop= RNA_def_property(srna, "registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_get", NULL);