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-05-26 20:07:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-26 20:07:28 +0400
commit57c3c9e70f0f5ad043f07ddaa25ed7d0cd5020e0 (patch)
treece144a5fa8ec5f2829ab28f2c538840f1ee5ece6 /source/blender/makesrna/intern/rna_access.c
parent155d5893337dd4bd632f8a669850356875b19414 (diff)
support for dynamic items in bpy.props.EnumProperty(), the items keyword argument can optionally be a function rather then a list.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 1db43b72a1e..8a7b5bb5966 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2120,6 +2120,14 @@ int RNA_property_enum_get_default(PointerRNA *ptr, PropertyRNA *prop)
return eprop->defaultvalue;
}
+void *RNA_property_enum_py_data_get(PropertyRNA *prop)
+{
+ EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+
+ BLI_assert(RNA_property_type(prop) == PROP_ENUM);
+
+ return eprop->py_data;
+}
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
{