static PyObject *bpy_bmeditselseq_remove(BPy_BMEditSelSeq *self, BPy_BMElem *value) { BPY_BM_CHECK_OBJ(self); if ((BPy_BMVert_Check(value) || BPy_BMEdge_Check(value) || BPy_BMFace_Check(value)) == FALSE) { PyErr_Format(PyExc_TypeError, "Expected a BMVert/BMedge/BMFace not a %.200s", Py_TYPE(value)->tp_name); return NULL; } BPY_BM_CHECK_OBJ(value); if ((self->bm != value->bm) || (BM_select_history_remove(self->bm, value->ele) == FALSE)) { PyErr_SetString(PyExc_ValueError, "Element not found in selection history"); return NULL; } Py_RETURN_NONE; }
static PyObject *bpy_bmeditselseq_add(BPy_BMEditSelSeq *self, BPy_BMElem *value) { BPY_BM_CHECK_OBJ(self); if ((BPy_BMVert_Check(value) || BPy_BMEdge_Check(value) || BPy_BMFace_Check(value)) == FALSE) { PyErr_Format(PyExc_TypeError, "Expected a BMVert/BMedge/BMFace not a %.200s", Py_TYPE(value)->tp_name); return NULL; } BPY_BM_CHECK_SOURCE_OBJ(value, self->bm, "select_history.add()"); BM_select_history_store(self->bm, value->ele); Py_RETURN_NONE; }