Added MVert.hide property because hidden verts were hanging BPyMesh_Redux
This commit is contained in:
@@ -1079,6 +1079,45 @@ static PyObject *MVert_getIndex( BPy_MVert * self )
|
||||
"PyInt_FromLong() failed" );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* get a verts's hidden state
|
||||
*/
|
||||
|
||||
static PyObject *MVert_getMFlagBits( BPy_MVert * self, void * type )
|
||||
{
|
||||
MVert *v;
|
||||
|
||||
v = MVert_get_pointer( self );
|
||||
|
||||
if( self->index >= ((Mesh *)self->data)->totvert )
|
||||
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||
"MVert is no longer valid" );
|
||||
|
||||
return EXPP_getBitfield( &v->flag, (int)((long)type & 0xff), 'b' );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* set a verts's hidden state
|
||||
*/
|
||||
|
||||
static int MVert_setMFlagBits( BPy_MVert * self, PyObject * value,
|
||||
void * type )
|
||||
{
|
||||
MVert *v;
|
||||
|
||||
v = MVert_get_pointer( self );
|
||||
|
||||
if( self->index >= ((Mesh *)self->data)->totvert )
|
||||
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||
"MVert is no longer valid" );
|
||||
|
||||
return EXPP_setBitfield( value, &v->flag,
|
||||
(int)((long)type & 0xff), 'b' );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* get a vertex's normal
|
||||
*/
|
||||
@@ -1256,6 +1295,10 @@ static PyGetSetDef BPy_MVert_getseters[] = {
|
||||
(getter)MVert_getSel, (setter)MVert_setSel,
|
||||
"vertex's select status",
|
||||
NULL},
|
||||
{"hide",
|
||||
(getter)MVert_getMFlagBits, (setter)MVert_setMFlagBits,
|
||||
"vert hidden in edit mode",
|
||||
(void *)ME_HIDE},
|
||||
{"uvco",
|
||||
(getter)MVert_getUVco, (setter)MVert_setUVco,
|
||||
"vertex's UV coordinates",
|
||||
|
||||
@@ -201,6 +201,8 @@ class MVert:
|
||||
was last exited. A Python script operating in EditMode must exit EditMode
|
||||
before getting the current selection state of the mesh.
|
||||
@type sel: int
|
||||
@ivar hide: The face's B{edit mode} visibility state (hidden=1).
|
||||
@type hide: int
|
||||
@warn: There are two kinds of UV texture coordinates in Blender: per vertex
|
||||
("sticky") and per face vertex (UV in L{MFace}). In the first, there's
|
||||
only one UV pair of coordinates for each vertex in the mesh. In the
|
||||
|
||||
Reference in New Issue
Block a user