diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 90 | ||||
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.c | 4 |
2 files changed, 2 insertions, 92 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 3da47d22d90..01503d2b1c5 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -451,47 +451,6 @@ static PyObject *bpy_bmedge_is_boundary_get(BPy_BMEdge *self) return PyBool_FromLong(BM_edge_is_boundary(self->e)); } -#ifdef WITH_FREESTYLE -PyDoc_STRVAR(bpy_bmedge_freestyle_edge_mark_doc, -"Freestyle edge mark.\n\n:type: boolean" -); -static PyObject *bpy_bmedge_freestyle_edge_mark_get(BPy_BMEdge *self) -{ - FreestyleEdge *fed; - - BPY_BM_CHECK_OBJ(self); - fed = CustomData_bmesh_get(&self->bm->edata, self->e->head.data, CD_FREESTYLE_EDGE); - return PyBool_FromLong(fed->flag & FREESTYLE_EDGE_MARK); -} - -static int bpy_bmedge_freestyle_edge_mark_set(BPy_BMEdge *self, PyObject *value) -{ - int param; - FreestyleEdge *fed; - - BPY_BM_CHECK_INT(self); - - param = PyLong_AsLong(value); - if (param != false && param != true) { - PyErr_SetString(PyExc_TypeError, - "expected a boolean type 0/1"); - return -1; - } - - if (!CustomData_has_layer(&self->bm->edata, CD_FREESTYLE_EDGE)) { - BM_data_layer_add(self->bm, &self->bm->edata, CD_FREESTYLE_EDGE); - } - - fed = CustomData_bmesh_get(&self->bm->edata, self->e->head.data, CD_FREESTYLE_EDGE); - if (param) - fed->flag &= ~FREESTYLE_EDGE_MARK; - else - fed->flag |= FREESTYLE_EDGE_MARK; - - return 0; -} -#endif - /* Face * ^^^^ */ @@ -551,47 +510,6 @@ static int bpy_bmface_material_index_set(BPy_BMFace *self, PyObject *value) } } -#ifdef WITH_FREESTYLE -PyDoc_STRVAR(bpy_bmface_freestyle_face_mark_doc, -"Freestyle face mark.\n\n:type: boolean" -); -static PyObject *bpy_bmface_freestyle_face_mark_get(BPy_BMFace *self) -{ - FreestyleFace *ffa; - - BPY_BM_CHECK_OBJ(self); - ffa = CustomData_bmesh_get(&self->bm->pdata, self->f->head.data, CD_FREESTYLE_FACE); - return PyBool_FromLong(ffa->flag & FREESTYLE_FACE_MARK); -} - -static int bpy_bmface_freestyle_face_mark_set(BPy_BMFace *self, PyObject *value) -{ - int param; - FreestyleFace *ffa; - - BPY_BM_CHECK_INT(self); - - param = PyLong_AsLong(value); - if (param != false && param != true) { - PyErr_SetString(PyExc_TypeError, - "expected a boolean type 0/1"); - return -1; - } - - if (!CustomData_has_layer(&self->bm->pdata, CD_FREESTYLE_FACE)) { - BM_data_layer_add(self->bm, &self->bm->pdata, CD_FREESTYLE_FACE); - } - - ffa = CustomData_bmesh_get(&self->bm->pdata, self->f->head.data, CD_FREESTYLE_FACE); - if (param) - ffa->flag &= ~FREESTYLE_FACE_MARK; - else - ffa->flag |= FREESTYLE_FACE_MARK; - - return 0; -} -#endif - /* Loop * ^^^^ */ @@ -773,10 +691,6 @@ static PyGetSetDef bpy_bmedge_getseters[] = { {(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH}, {(char *)"seam", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_seam_doc, (void *)BM_ELEM_SEAM}, -#ifdef WITH_FREESTYLE - {(char *)"freestyle_edge_mark", (getter)bpy_bmedge_freestyle_edge_mark_get, (setter)bpy_bmedge_freestyle_edge_mark_set, (char *)bpy_bmedge_freestyle_edge_mark_doc, NULL}, -#endif - /* connectivity data */ {(char *)"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_verts_doc, (void *)BM_VERTS_OF_EDGE}, @@ -803,10 +717,6 @@ static PyGetSetDef bpy_bmface_getseters[] = { {(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH}, -#ifdef WITH_FREESTYLE - {(char *)"freestyle_face_mark", (getter)bpy_bmface_freestyle_face_mark_get, (setter)bpy_bmface_freestyle_face_mark_set, (char *)bpy_bmface_freestyle_face_mark_doc, NULL}, -#endif - {(char *)"normal", (getter)bpy_bmface_normal_get, (setter)bpy_bmface_normal_set, (char *)bpy_bmface_normal_doc, NULL}, {(char *)"material_index", (getter)bpy_bmface_material_index_get, (setter)bpy_bmface_material_index_set, (char *)bpy_bmface_material_index_doc, NULL}, diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 63ad8756cec..b0604fa2dbc 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -203,7 +203,7 @@ static PyGetSetDef bpy_bmlayeraccess_edge_getseters[] = { {(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT}, {(char *)"crease", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__crease_doc, (void *)CD_CREASE}, #ifdef WITH_FREESTYLE - {(char *)"freestyle_edge", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_edge_doc, (void *)CD_FREESTYLE_EDGE}, + {(char *)"freestyle", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_edge_doc, (void *)CD_FREESTYLE_EDGE}, #endif {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -217,7 +217,7 @@ static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = { {(char *)"tex", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__tex_doc, (void *)CD_MTEXPOLY}, #ifdef WITH_FREESTYLE - {(char *)"freestyle_face", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_face_doc, (void *)CD_FREESTYLE_FACE}, + {(char *)"freestyle", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_face_doc, (void *)CD_FREESTYLE_FACE}, #endif {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ |