fix for python not being able to call operators with a executuon context.

This commit is contained in:
2010-02-10 11:10:38 +00:00
parent fbc201d2dd
commit c2b2ccde45
6 changed files with 34 additions and 39 deletions

View File

@@ -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);