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:
-rw-r--r--source/blender/makesrna/intern/rna_access.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 8be14be78f4..3edab8ebc68 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -574,6 +574,19 @@ const struct ListBase *RNA_struct_defined_properties(StructRNA *srna)
FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
{
+#if 1
+ FunctionRNA *func;
+ StructRNA *type;
+ for(type= ptr->type; type; type= type->base) {
+ for(func= type->functions.first; func; func= func->cont.next) {
+ if(strcmp(func->identifier, identifier)==0)
+ return func;
+ }
+ }
+ return NULL;
+
+ /* funcitonal but slow */
+#else
PointerRNA tptr;
PropertyRNA *iterprop;
FunctionRNA *func;
@@ -592,6 +605,7 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
RNA_PROP_END;
return func;
+#endif
}
const struct ListBase *RNA_struct_defined_functions(StructRNA *srna)