diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 14:10:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 14:10:38 +0300 |
commit | c2b2ccde45a9424339337ef130255138b912d29d (patch) | |
tree | 36589ef155abb4fe9cb703fce16fcf52c191521f /source/blender/python/intern/bpy_rna.c | |
parent | fbc201d2ddcda5db4d5d41ac3a3ba8f3cd4a2ba9 (diff) |
fix for python not being able to call operators with a executuon context.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 04d29d40ca6..bdd27680557 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -389,7 +389,7 @@ static char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop) RNA_property_enum_items(BPy_GetContext(), ptr, prop, &item, NULL, &free); if(item) { - result= (char*)BPy_enum_as_string(item); + result= BPy_enum_as_string(item); } else { result= ""; @@ -401,6 +401,7 @@ static char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop) return result; } + static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *prop, int *val, const char *error_prefix) { char *param= _PyUnicode_AsString(item); |