[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54514] trunk/blender/source/blender/ python/bmesh/bmesh_py_ops_call.c: bmesh operators exceptions were not cleared after raising as a python exception .
Campbell Barton
ideasman42 at gmail.com
Wed Feb 13 05:55:06 CET 2013
Revision: 54514
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54514
Author: campbellbarton
Date: 2013-02-13 04:55:05 +0000 (Wed, 13 Feb 2013)
Log Message:
-----------
bmesh operators exceptions were not cleared after raising as a python exception.
also clear before calling the operator.
Modified Paths:
--------------
trunk/blender/source/blender/python/bmesh/bmesh_py_ops_call.c
Modified: trunk/blender/source/blender/python/bmesh/bmesh_py_ops_call.c
===================================================================
--- trunk/blender/source/blender/python/bmesh/bmesh_py_ops_call.c 2013-02-13 04:04:14 UTC (rev 54513)
+++ trunk/blender/source/blender/python/bmesh/bmesh_py_ops_call.c 2013-02-13 04:55:05 UTC (rev 54514)
@@ -48,11 +48,13 @@
static int bpy_bm_op_as_py_error(BMesh *bm)
{
if (BMO_error_occurred(bm)) {
+ /* note: we could have multiple errors */
const char *errmsg;
if (BMO_error_get(bm, &errmsg, NULL)) {
PyErr_Format(PyExc_RuntimeError,
"bmesh operator: %.200s",
errmsg);
+ BMO_error_clear(bm);
return -1;
}
}
@@ -692,6 +694,9 @@
{
BPY_BM_CHECK_OBJ(py_bm);
bm = py_bm->bm;
+
+ /* could complain about entering with exceptions... */
+ BMO_error_clear(bm);
}
else {
PyErr_SetString(PyExc_TypeError,
More information about the Bf-blender-cvs
mailing list