Cleanup: add CTX_wm_operator_poll_msg_clear

Call this function instead of `CTX_wm_operator_poll_msg_set(C, NULL)`
This commit is contained in:
2021-04-20 11:42:00 +10:00
parent 795f024558
commit 985ccba77c
5 changed files with 16 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
"Operator bpy.ops.%.200s.poll() %.200s",
opname,
msg ? msg : "failed, context is incorrect");
CTX_wm_operator_poll_msg_set(C, NULL); /* better set to NULL else it could be used again */
CTX_wm_operator_poll_msg_clear(C);
error_val = -1;
}
else {