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>2010-08-17 18:32:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-17 18:32:14 +0400
commitb278279c95c9396432a66ef50499e45389e9ec18 (patch)
tree35a454ba66936f75b818c6d84dd655327a76b97e /source/blender/makesrna/intern/rna_rna.c
parent08d55cbe985b97933a701848e2edaf0cd1a68641 (diff)
document rna functions that have the no_self flag set as classmethods
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 6c7670907b7..0ee3990ef3f 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -811,6 +811,12 @@ static int rna_Function_registered_optional_get(PointerRNA *ptr)
return func->flag & FUNC_REGISTER_OPTIONAL;
}
+static int rna_Function_no_self_get(PointerRNA *ptr)
+{
+ FunctionRNA *func= (FunctionRNA*)ptr->data;
+ return func->flag & FUNC_NO_SELF;
+}
+
/* Blender RNA */
static void rna_BlenderRNA_structs_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
@@ -1049,6 +1055,11 @@ static void rna_def_function(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_registered_optional_get", NULL);
RNA_def_property_ui_text(prop, "Registered Optionally", "Function is optionally registered as callback part of type registration");
+
+ prop= RNA_def_property(srna, "no_self", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Function_no_self_get", NULL);
+ RNA_def_property_ui_text(prop, "No Self", "Function does not pass its self as an argument (becomes a class method in python)");
}
static void rna_def_number_property(StructRNA *srna, PropertyType type)