+/* FaceSeq
+ * ^^^^^^^ */
+
+PyDoc_STRVAR(bpy_bmfaceseq_active_doc,
+"active face.\n\n:type: :class:`BMFace` or None"
+);
+static PyObject *bpy_bmfaceseq_active_get(BPy_BMElemSeq *self, void *UNUSED(closure))
+{
+ BMesh *bm = self->bm;
+ BPY_BM_CHECK_OBJ(self);
+
+ if (bm->act_face) {
+ return BPy_BMElem_CreatePyObject(bm, (BMHeader *)bm->act_face);
+ }
+ else {
+ Py_RETURN_NONE;
+ }
+}
+
+static int bpy_bmfaceseq_active_set(BPy_BMElem *self, PyObject *value, void *UNUSED(closure))
+{
+ BMesh *bm = self->bm;
+ if (value == Py_None) {
+ bm->act_face = NULL;
+ return 0;
+ }
+ else if (BPy_BMFace_Check(value)) {
+ BPY_BM_CHECK_INT(value);
+
+ if (((BPy_BMFace *)value)->bm != bm) {
+ PyErr_SetString(PyExc_ValueError,
+ "faces.active = f: f is from another mesh");
+ return -1;
+ }
+ else {
+ bm->act_face = ((BPy_BMFace *)value)->f;
+ return 0;
+ }
+ }
+ else {
+ PyErr_Format(PyExc_TypeError,
+ "faces.active = f: expected BMFace or None, not %.200s",
+ Py_TYPE(value)->tp_name);
+ return -1;
+ }
+}
+