diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-25 08:11:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-25 08:19:58 +0300 |
commit | bdbf4471a6c4ba2d444eea5e7f0e6984b3aaafc2 (patch) | |
tree | 0aeabc52f0b6c770270b0dfe5f5877cb790c826d /source/blender/python | |
parent | c7c6070a6469055a1a503acec47780a2de30c218 (diff) |
TexFace removal part 3
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
Diffstat (limited to 'source/blender/python')
5 files changed, 0 insertions, 88 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index d5973baeadb..d6189f7c1eb 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -156,11 +156,6 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, { extern void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_destructive); - BMEditMesh *em = me->edit_btmesh; - BMesh *bm = em->bm; - - /* python won't ensure matching uv/mtex */ - BM_mesh_cd_validate(bm); EDBM_update_generic(me->edit_btmesh, do_tessface, is_destructive); } diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 4709f718958..88445cfd62b 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -914,9 +914,6 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args) bm = self->bm; - /* python won't ensure matching uv/mtex */ - BM_mesh_cd_validate(bm); - BM_mesh_bm_to_me(bm, me, (&(struct BMeshToMeshParams){0})); /* we could have the user do this but if they forget blender can easy crash diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 908f6b5a734..47dead028a4 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -104,9 +104,6 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__bevel_weight_doc, PyDoc_STRVAR(bpy_bmlayeraccess_collection__crease_doc, "Edge crease for subsurf - float in [0 - 1].\n\n:type: :class:`BMLayerCollection`" ); -PyDoc_STRVAR(bpy_bmlayeraccess_collection__tex_doc, -"Accessor for :class:`BMTexPoly` layer (TODO).\n\ntype: :class:`BMLayerCollection`" // TYPE DOESN'T EXIST YET -); PyDoc_STRVAR(bpy_bmlayeraccess_collection__uv_doc, "Accessor for :class:`BMLoopUV` UV (as a 2D Vector).\n\ntype: :class:`BMLayerCollection`" ); @@ -222,8 +219,6 @@ static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = { {(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT}, {(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR}, - {(char *)"tex", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__tex_doc, (void *)CD_MTEXPOLY}, - #ifdef WITH_FREESTYLE {(char *)"freestyle", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_face_doc, (void *)CD_FREESTYLE_FACE}, #endif @@ -998,11 +993,6 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer) ret = PyBytes_FromStringAndSize(mstring->s, mstring->s_len); break; } - case CD_MTEXPOLY: - { - ret = BPy_BMTexPoly_CreatePyObject(value); - break; - } case CD_MLOOPUV: { ret = BPy_BMLoopUV_CreatePyObject(value); @@ -1101,11 +1091,6 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj } break; } - case CD_MTEXPOLY: - { - ret = BPy_BMTexPoly_AssignPyObject(value, py_value); - break; - } case CD_MLOOPUV: { ret = BPy_BMLoopUV_AssignPyObject(value, py_value); diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 7bbe030dc7e..f6926e8437d 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -47,66 +47,6 @@ #include "../generic/python_utildefines.h" - -/* Mesh BMTexPoly - * ************** */ - -#define BPy_BMTexPoly_Check(v) (Py_TYPE(v) == &BPy_BMTexPoly_Type) - -typedef struct BPy_BMTexPoly { - PyObject_VAR_HEAD - MTexPoly *data; -} BPy_BMTexPoly; - -/* TODO, flag access */ -#if 0 -static PyGetSetDef bpy_bmtexpoly_getseters[] = { - /* attributes match rna_def_mtpoly */ - - {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ -}; -#endif - -static PyTypeObject BPy_BMTexPoly_Type; /* bm.loops.layers.uv.active */ - -static void bm_init_types_bmtexpoly(void) -{ - BPy_BMTexPoly_Type.tp_basicsize = sizeof(BPy_BMTexPoly); - - BPy_BMTexPoly_Type.tp_name = "BMTexPoly"; - - BPy_BMTexPoly_Type.tp_doc = NULL; // todo - -#if 0 - BPy_BMTexPoly_Type.tp_getset = bpy_bmtexpoly_getseters; -#endif - - BPy_BMTexPoly_Type.tp_flags = Py_TPFLAGS_DEFAULT; - - PyType_Ready(&BPy_BMTexPoly_Type); -} - -int BPy_BMTexPoly_AssignPyObject(struct MTexPoly *mtpoly, PyObject *value) -{ - if (UNLIKELY(!BPy_BMTexPoly_Check(value))) { - PyErr_Format(PyExc_TypeError, "expected BMTexPoly, not a %.200s", Py_TYPE(value)->tp_name); - return -1; - } - else { - *((MTexPoly *)mtpoly) = *(((BPy_BMTexPoly *)value)->data); - return 0; - } -} - -PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mtpoly) -{ - BPy_BMTexPoly *self = PyObject_New(BPy_BMTexPoly, &BPy_BMTexPoly_Type); - self->data = mtpoly; - return (PyObject *)self; -} - -/* --- End Mesh BMTexPoly --- */ - /* Mesh Loop UV * ************ */ @@ -768,7 +708,6 @@ PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert) /* call to init all types */ void BPy_BM_init_types_meshdata(void) { - bm_init_types_bmtexpoly(); bm_init_types_bmloopuv(); bm_init_types_bmloopcol(); bm_init_types_bmdvert(); diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h index 07d8a46cc65..c8ae2596f99 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h @@ -40,15 +40,11 @@ typedef struct BPy_BMGenericMeshData { void *data; } BPy_BMGenericMeshData; -struct MTexPoly; struct MLoopUV; struct MLoopCol; struct MDeformVert; struct MVertSkin; -int BPy_BMTexPoly_AssignPyObject(struct MTexPoly *mloopuv, PyObject *value); -PyObject *BPy_BMTexPoly_CreatePyObject(struct MTexPoly *mloopuv); - int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value); PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data); |