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>2011-01-25 09:54:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-25 09:54:57 +0300
commitc0e74f9dce632795ed6e083436353b4df4d7e62c (patch)
treecc5d6f06da0bdb5d4f73a4c040bfcc9159b74a31 /source/blender/makesrna/intern/rna_access.c
parent17509e733429bdcc3a6131a775d2d73252b6bb88 (diff)
fix [#25748] Addons register parameters/functions more than once
- values were added to both the classes __dict__ as well as the internal StructRNA. - made properties available from the type since this is where the python api assigns them: >>> bpy.types.Scene.frame_start <bpy_struct, IntProperty("frame_start")> - rename RNA_struct_type_properties() -> RNA_struct_type_properties(), added RNA_struct_type_find_property()
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index cc2e5fc909f..15a26711d1c 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -569,11 +569,17 @@ PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
return prop;
}
-const struct ListBase *RNA_struct_defined_properties(StructRNA *srna)
+/* low level direct access to type->properties, note this ignores parent classes so should be used with care */
+const struct ListBase *RNA_struct_type_properties(StructRNA *srna)
{
return &srna->cont.properties;
}
+PropertyRNA *RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
+{
+ return BLI_findstring_ptr(&srna->cont.properties, identifier, offsetof(PropertyRNA, identifier));
+}
+
FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
{
#if 1