TexFace removal part 3
- MTexPoly structure & layer type. - The 'Mesh.uv_textures' layers. - DerivedMesh TexFace drawing. - Scripts & UI.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user