From ee1d2adc1685b4aea3a02155379bc02b9298acc9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Nov 2010 12:05:35 +0000 Subject: partial fix for [#23532] - Python calling operators didn't run WM_operator_properties_sanitize() so enum functions called from python were given a NULL context. - PROP_ENUM_NO_CONTEXT and PROP_NEVER_NULL used the same value in the enum (possible conflict). --- source/blender/python/intern/bpy_operator.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/python/intern/bpy_operator.c') diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index e78e79fd6a8..c471f354fd4 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -156,6 +156,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args) } else { WM_operator_properties_create_ptr(&ptr, ot); + WM_operator_properties_sanitize(&ptr, 0); if(kw && PyDict_Size(kw)) error_val= pyrna_pydict_to_props(&ptr, kw, 0, "Converting py args to operator properties: "); @@ -306,6 +307,7 @@ static PyObject *pyop_getrna(PyObject *UNUSED(self), PyObject *value) /* XXX - should call WM_operator_properties_free */ WM_operator_properties_create_ptr(&ptr, ot); + WM_operator_properties_sanitize(&ptr, 0); pyrna= (BPy_StructRNA *)pyrna_struct_CreatePyObject(&ptr); -- cgit v1.2.3