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-11-23 15:05:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-23 15:05:35 +0300
commitee1d2adc1685b4aea3a02155379bc02b9298acc9 (patch)
tree53205d0a4b643b706b353290ff804fe043bded22 /source/blender/python/intern/bpy_operator.c
parent855b83caece3bf95443852ce5e73a8e759273a7d (diff)
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).
Diffstat (limited to 'source/blender/python/intern/bpy_operator.c')
-rw-r--r--source/blender/python/intern/bpy_operator.c2
1 files changed, 2 insertions, 0 deletions
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);