diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-10-27 18:47:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-10-27 18:47:58 +0300 |
commit | 2e96728843d01fa0e8c79133b0e7f943930405de (patch) | |
tree | 3694c8af2120e0206006901b21592b0c516e4106 /source/blender/python | |
parent | 71260b6603b1edfdbae57bfaa7d7388af366b17e (diff) |
face transp option CLIP wasnt added to the py api.
added gameObject.replaceMesh(meshname) - needed this for an automatically generated scene where 100's of objects would have needed logic bricks automatically added. Quicker to run replace mesh on all of them from 1 script.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/api2_2x/Material.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Mesh.c | 3 | ||||
-rw-r--r-- | source/blender/python/api2_2x/doc/Mesh.py | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index 2e6bd326fb6..cb2c81aba6e 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -2506,10 +2506,10 @@ static PyObject *Material_setTexture( BPy_Material * self, PyObject * args ) if( !PyArg_ParseTuple( args, "iO!|ii", &texnum, &Texture_Type, &pytex, &texco, &mapto ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected int in [0,9] and Texture" ); + "expected int in [0,17] and Texture" ); if( ( texnum < 0 ) || ( texnum >= MAX_MTEX ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, - "expected int in [0,9] and Texture" ); + "expected int in [0,17] and Texture" ); bltex = Texture_FromPyObject( pytex ); diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c index d513a8be4db..a97a55244ad 100644 --- a/source/blender/python/api2_2x/Mesh.c +++ b/source/blender/python/api2_2x/Mesh.c @@ -4239,7 +4239,7 @@ static int MFace_setTransp( BPy_MFace *self, PyObject *value ) return -1; return EXPP_setIValueRange( value, - &self->mesh->mtface[self->index].transp, TF_SOLID, TF_SUB, 'b' ); + &self->mesh->mtface[self->index].transp, TF_SOLID, TF_CLIP, 'b' ); } /* @@ -8743,6 +8743,7 @@ static PyObject *M_Mesh_FaceTranspModesDict( void ) PyConstant_Insert( d, "ADD", PyInt_FromLong( TF_ADD ) ); PyConstant_Insert( d, "ALPHA", PyInt_FromLong( TF_ALPHA ) ); PyConstant_Insert( d, "SUB", PyInt_FromLong( TF_SUB ) ); + PyConstant_Insert( d, "CLIP", PyInt_FromLong( TF_CLIP ) ); } return FTM; diff --git a/source/blender/python/api2_2x/doc/Mesh.py b/source/blender/python/api2_2x/doc/Mesh.py index e48f41e8f9c..9b6dcae8bb6 100644 --- a/source/blender/python/api2_2x/doc/Mesh.py +++ b/source/blender/python/api2_2x/doc/Mesh.py @@ -85,6 +85,7 @@ done once. - ADD - add to background (halo). - ALPHA - draw with transparency. - SUB - subtract from background. + - CLIP - Clipped alpha. @var EdgeFlags: The available edge flags. - SELECT - selected (B{deprecated}). Use edge.sel attribute instead. - EDGEDRAW - edge is drawn out of edition mode. |