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-02-27 18:28:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-27 18:28:34 +0300
commitc76b6fcb06c45f0e018a6c8a892f380099a2371a (patch)
tree5dd51522c47dcdfeede000fe1d7a9c95844bdbca /source/blender/python/intern/bpy_rna.h
parent3dd3e7321eee426112859bfc2427749c2f6113e6 (diff)
utility function pyrna_enum_value_from_id for getting the enum from a string and raising an error if its invalid.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r--source/blender/python/intern/bpy_rna.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 77f6ec00d48..770e88e1a1d 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -84,6 +84,8 @@ PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop);
PyObject *pyrna_enum_bitfield_to_py(struct EnumPropertyItem *items, int value);
int pyrna_set_to_enum_bitfield(EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix);
+int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix);
+
/* function for registering types */
PyObject *pyrna_basetype_register(PyObject *self, PyObject *args);
PyObject *pyrna_basetype_unregister(PyObject *self, PyObject *args);