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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-18 17:02:20 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-18 17:02:20 +0400
commit26836bf44f39d4c83d7b4de94dd742c84cf82eda (patch)
treefcada9d85208c899c4aa733333bc97af25416a97 /source/blender/python/intern/bpy_operator.c
parent854ea35a2498cb35e7cce26e396fab775692196e (diff)
2.5: Python operators now have a working poll() function,
solved by wrapping all polling in WM_operator_poll and adding a special callback for python.
Diffstat (limited to 'source/blender/python/intern/bpy_operator.c')
-rw-r--r--source/blender/python/intern/bpy_operator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 69a7e554452..f2e2dd77e6d 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -65,7 +65,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
return NULL;
}
- if(ot->poll && (ot->poll(C) == FALSE)) {
+ if(WM_operator_poll((bContext*)C, ot) == FALSE) {
PyErr_SetString( PyExc_SystemError, "bpy.__ops__.call: operator poll() function failed, context is incorrect");
return NULL;
}