BMesh: make toolflags optional
Saves 8 bytes per vert/edge/face. Gives overall ~20-25% memory saving for dyntopo sculpting and modifiers that use BMesh.
This commit is contained in:
@@ -698,6 +698,12 @@ PyObject *BPy_BMO_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw)
|
||||
BPY_BM_CHECK_OBJ(py_bm);
|
||||
bm = py_bm->bm;
|
||||
|
||||
if (bm->use_toolflags == false) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"bmesh created with 'use_operators=False'");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* could complain about entering with exceptions... */
|
||||
BMO_error_clear(bm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user