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:
2016-07-01 19:07:11 +10:00
parent 4b0aeaf327
commit 0a026033ae
58 changed files with 887 additions and 601 deletions

View File

@@ -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);
}