diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index c9e49dea774..956de7e2504 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -3844,7 +3844,14 @@ static PyObject *MFace_getFlag( BPy_MFace *self ) static int MFace_setFlag( BPy_MFace *self, PyObject *value ) { int param; - static short bitmask = TF_SELECT | TF_HIDE; + static short bitmask = + TF_SELECT | + TF_ACTIVE | + TF_SEL1 | + TF_SEL2 | + TF_SEL3 | + TF_SEL4 | + TF_HIDE; if( !self->mesh->tface ) return EXPP_ReturnIntError( PyExc_ValueError, @@ -3861,10 +3868,8 @@ static int MFace_setFlag( BPy_MFace *self, PyObject *value ) param = PyInt_AS_LONG ( value ); /* only one face can be active, so don't allow that here */ - - if( ( param & bitmask ) == TF_ACTIVE ) - return EXPP_ReturnIntError( PyExc_ValueError, - "cannot make a face active; use 'activeFace' attribute" ); + if( param & TF_ACTIVE ) + param &= ~TF_ACTIVE; if( ( param & bitmask ) != param ) return EXPP_ReturnIntError( PyExc_ValueError, diff --git a/source/blender/python/api2_2x/doc/Mesh.py b/source/blender/python/api2_2x/doc/Mesh.py index 05f6efe2857..47c295e71b1 100644 --- a/source/blender/python/api2_2x/doc/Mesh.py +++ b/source/blender/python/api2_2x/doc/Mesh.py @@ -58,14 +58,13 @@ done once. - NOVNORMALSFLIP - no flipping of vertex normals during render. - TWOSIDED - double sided mesh. - AUTOSMOOTH - turn auto smoothing of faces "on". - - SUBSURF - turn Catmull-Clark subdivision of surfaces "on". - - OPTIMAL - optimal drawing of edges when "SubSurf" is "on". + - note: SUBSURF and OPTIMAL have been removed, use Modifiers to apply subsurf. @var FaceFlags: The available *texture face* (uv face select mode) selection flags. Note: these refer to TexFace faces, available if mesh.faceUV() returns true. - SELECT - selected. - HIDE - hidden. - - ACTIVE - the active face. + - ACTIVE - the active face, read only - Use L{mesh.activeFace} to set. @var FaceModes: The available *texture face* modes. Note: these are only meaningful if mesh.faceUV() returns true, since in Blender this info is stored at the TexFace (TexFace button in Edit Mesh buttons) structure.