diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index 1b9b1041aee..122c294001b 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -34,6 +34,7 @@ #include "BKE_global.h" #include "BKE_object.h" #include "BKE_library.h" +#include "BKE_texture.h" #include "BLI_blenlib.h" #include "BIF_space.h" #include "BSE_editipo.h" @@ -44,6 +45,7 @@ #include "gen_utils.h" #include "gen_library.h" #include "BKE_utildefines.h" +#include "MEM_guardedalloc.h" /*****************************************************************************/ /* Python BPy_Lamp defaults: */ @@ -255,6 +257,7 @@ static int Lamp_setHaloInt( BPy_Lamp * self, PyObject * args ); static int Lamp_setQuad1( BPy_Lamp * self, PyObject * args ); static int Lamp_setQuad2( BPy_Lamp * self, PyObject * args ); static int Lamp_setCol( BPy_Lamp * self, PyObject * args ); +static int Lamp_setTextures( BPy_Lamp * self, PyObject * value ); static PyObject *Lamp_getScriptLinks( BPy_Lamp * self, PyObject * value ); static PyObject *Lamp_addScriptLink( BPy_Lamp * self, PyObject * args ); static PyObject *Lamp_clearScriptLinks( BPy_Lamp * self, PyObject * args ); @@ -503,7 +506,7 @@ static PyGetSetDef BPy_Lamp_getseters[] = { "Lamp color blue component", (void *)EXPP_LAMP_COMP_B}, {"textures", - (getter)Lamp_getTextures, (setter)NULL, + (getter)Lamp_getTextures, (setter)Lamp_setTextures, "The Lamp's texture list as a tuple", NULL}, {"Modes", @@ -1423,6 +1426,76 @@ static PyObject *Lamp_getTextures( BPy_Lamp * self ) return tuple; } +static int Lamp_setTextures( BPy_Lamp * self, PyObject * value ) +{ + int i; + + if( !PyList_Check( value ) && !PyTuple_Check( value ) ) + return EXPP_ReturnIntError( PyExc_TypeError, + "expected tuple or list of integers" ); + + /* don't allow more than MAX_MTEX items */ + if( PySequence_Size(value) > MAX_MTEX ) + return EXPP_ReturnIntError( PyExc_AttributeError, + "size of sequence greater than number of allowed textures" ); + + /* get a fast sequence; in Python 2.5, this just return the original + * list or tuple and INCREFs it, so we must DECREF */ + value = PySequence_Fast( value, "" ); + + /* check the list for valid entries */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + if( item == Py_None || ( BPy_MTex_Check( item ) && + ((BPy_MTex *)item)->type == ID_LA ) ) { + continue; + } else { + Py_DECREF(value); + return EXPP_ReturnIntError( PyExc_TypeError, + "expected tuple or list containing lamp MTex objects and NONE" ); + } + } + + /* for each MTex object, copy to this structure */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + struct MTex *mtex = self->lamp->mtex[i]; + if( item != Py_None ) { + BPy_MTex *obj = (BPy_MTex *)item; + + /* if MTex is already at this location, just skip it */ + if( obj->mtex == mtex ) continue; + + /* create a new entry if needed, otherwise update reference count + * for texture that is being replaced */ + if( !mtex ) + mtex = self->lamp->mtex[i] = add_mtex( ); + else + mtex->tex->id.us--; + + /* copy the data */ + mtex->tex = obj->mtex->tex; + id_us_plus( &mtex->tex->id ); + mtex->texco = obj->mtex->texco; + mtex->mapto = obj->mtex->mapto; + } + } + + /* now go back and free any entries now marked as None */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + struct MTex *mtex = self->lamp->mtex[i]; + if( item == Py_None && mtex ) { + mtex->tex->id.us--; + MEM_freeN( mtex ); + self->lamp->mtex[i] = NULL; + } + } + + Py_DECREF(value); + return 0; +} + /* #####DEPRECATED###### */ static PyObject *Lamp_oldsetSamples( BPy_Lamp * self, PyObject * args ) diff --git a/source/blender/python/api2_2x/MTex.c b/source/blender/python/api2_2x/MTex.c index fa7c62ac8d6..4db9715a465 100644 --- a/source/blender/python/api2_2x/MTex.c +++ b/source/blender/python/api2_2x/MTex.c @@ -22,7 +22,7 @@ * * This is a new part of Blender. * - * Contributor(s): Alex Mole, Yehoshua Sapir + * Contributor(s): Alex Mole, Yehoshua Sapir, Ken Hughes * * ***** END GPL LICENSE BLOCK ***** */ @@ -36,7 +36,8 @@ #include "gen_utils.h" #include "gen_library.h" -#include +#include "DNA_material_types.h" +#include "DNA_world_types.h" /*****************************************************************************/ /* Python BPy_MTex methods declarations: */ @@ -95,6 +96,7 @@ MTEXGETSET(ProjX) MTEXGETSET(ProjY) MTEXGETSET(ProjZ) MTEXGETSET(MapToFlag) +MTEXGETSET(WorldMapToFlag) /*****************************************************************************/ /* Python get/set methods table */ @@ -155,8 +157,14 @@ static PyGetSetDef MTex_getseters[] = { "Projection of Y axis to Texture space", NULL }, { "zproj", (getter) MTex_getProjZ, (setter) MTex_setProjZ, "Projection of Z axis to Texture space", NULL }, + + /* MapTo for Material and Lamp MTex */ + { "mtCol", (getter) MTex_getMapToFlag, (setter) MTex_setMapToFlag, "How texture maps to color", (void*) MAP_COL }, + + /* MapTo for Material MTex */ + { "mtNor", (getter) MTex_getMapToFlag, (setter) MTex_setMapToFlag, "How texture maps to normals", (void*) MAP_NORM }, { "mtCsp", (getter) MTex_getMapToFlag, (setter) MTex_setMapToFlag, @@ -183,6 +191,18 @@ static PyGetSetDef MTex_getseters[] = { "How texture maps to displacement", (void*) MAP_DISPLACE }, { "mtWarp", (getter) MTex_getMapToFlag, (setter) MTex_setMapToFlag, "How texture maps to warp", (void*) MAP_WARP }, + + /* MapTo for World MTex */ + + { "mtBlend", (getter) MTex_getWorldMapToFlag, (setter) MTex_setWorldMapToFlag, + "Texture affects color progression of background", (void*) WOMAP_BLEND }, + { "mtHoriz", (getter) MTex_getWorldMapToFlag, (setter) MTex_setWorldMapToFlag, + "Texture affects color of the horizon", (void*) WOMAP_HORIZ }, + { "mtZenUp", (getter) MTex_getWorldMapToFlag, (setter) MTex_setWorldMapToFlag, + "Texture affects color of the zenith above", (void*) WOMAP_ZENUP }, + { "mtZenDown", (getter) MTex_getWorldMapToFlag, (setter) MTex_setWorldMapToFlag, + "Texture affects color of the zenith below", (void*) WOMAP_ZENDOWN }, + { NULL, NULL, NULL, NULL, NULL } }; @@ -323,19 +343,37 @@ static int MTex_setTexCo( BPy_MTex *self, PyObject *value, void *closure) { int texco; - if( !PyInt_Check( value ) ) { + if( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "Value must be a member of Texture.TexCo dictionary" ); - } texco = PyInt_AsLong( value ) ; - if (texco != TEXCO_ORCO && texco != TEXCO_REFL && texco != TEXCO_NORM && - texco != TEXCO_GLOB && texco != TEXCO_UV && texco != TEXCO_OBJECT && - texco != TEXCO_STRESS && texco != TEXCO_TANGENT && texco != TEXCO_WINDOW && - texco != TEXCO_VIEW && texco != TEXCO_STICKY ) - return EXPP_ReturnIntError( PyExc_ValueError, - "Value must be a member of Texture.TexCo dictionary" ); + switch ( self->type ) { + case ID_MA : + if( texco != TEXCO_ORCO && texco != TEXCO_REFL && + texco != TEXCO_NORM && texco != TEXCO_GLOB && + texco != TEXCO_UV && texco != TEXCO_OBJECT && + texco != TEXCO_STRESS && texco != TEXCO_TANGENT && + texco != TEXCO_WINDOW && texco != TEXCO_VIEW && + texco != TEXCO_STICKY ) + return EXPP_ReturnIntError( PyExc_ValueError, + "Value must be a member of Texture.TexCo dictionary" ); + break; + case ID_LA : + if( texco != TEXCO_VIEW && texco != TEXCO_GLOB && + texco != TEXCO_OBJECT ) + return EXPP_ReturnIntError( PyExc_ValueError, + "Value must be a member of Texture.TexCo dictionary" ); + break; + default: /* ID_WO */ + if( texco != TEXCO_VIEW && texco != TEXCO_GLOB && + texco != TEXCO_ANGMAP && texco != TEXCO_OBJECT && + texco != TEXCO_H_SPHEREMAP && texco != TEXCO_H_TUBEMAP ) + return EXPP_ReturnIntError( PyExc_ValueError, + "Value must be a member of Texture.TexCo dictionary" ); + break; + } self->mtex->texco = (short)texco; @@ -468,18 +506,13 @@ static int MTex_setBlendMode( BPy_MTex *self, PyObject *value, void *closure) if ( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, - "Value must be member of Texture.BlendModes dictionary" ); + "Value must be member of Texture.BlendModes dictionary" ); n = PyInt_AsLong(value); -/* if (n != MTEX_BLEND && n != MTEX_MUL && n != MTEX_ADD && - n != MTEX_SUB && n != MTEX_DIV && n != MTEX_DARK && - n != MTEX_DIFF && n != MTEX_LIGHT && n != MTEX_SCREEN)*/ if (n < 0 || n > 8) - { return EXPP_ReturnIntError( PyExc_ValueError, - "Value must be member of Texture.BlendModes dictionary" ); - } + "Value must be member of Texture.BlendModes dictionary" ); self->mtex->blendtype = (short)n; @@ -675,19 +708,33 @@ static int MTex_setMapping( BPy_MTex *self, PyObject *value, void *closure) static PyObject *MTex_getFlag( BPy_MTex *self, void *closure ) { - return PyBool_FromLong( self->mtex->texflag & (GET_INT_FROM_POINTER(closure)) ); + int flag = GET_INT_FROM_POINTER(closure); + + if( self->type != ID_MA && + flag & ( MTEX_VIEWSPACE | MTEX_DUPLI_MAPTO | MTEX_OB_DUPLI_ORIG ) ) + return EXPP_ReturnPyObjError( PyExc_AttributeError, + "attribute only vaild for material MTex object" ); + + return PyBool_FromLong( self->mtex->texflag & flag ); } static int MTex_setFlag( BPy_MTex *self, PyObject *value, void *closure) { + int flag = GET_INT_FROM_POINTER(closure); + + if( self->type != ID_MA && + flag & ( MTEX_VIEWSPACE | MTEX_DUPLI_MAPTO | MTEX_OB_DUPLI_ORIG ) ) + return EXPP_ReturnIntError( PyExc_AttributeError, + "attribute only vaild for material MTex object" ); + if ( !PyBool_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, "expected a bool"); if ( value == Py_True ) - self->mtex->texflag |= GET_INT_FROM_POINTER(closure); + self->mtex->texflag |= flag; else - self->mtex->texflag &= ~(GET_INT_FROM_POINTER(closure)); + self->mtex->texflag &= ~flag; return 0; } @@ -798,9 +845,9 @@ static PyObject *MTex_getMapToFlag( BPy_MTex *self, void *closure ) { int flag = GET_INT_FROM_POINTER(closure); - if( self->type != ID_MA ) + if( self->type == ID_LA && flag != MAP_COL ) return EXPP_ReturnPyObjError( PyExc_AttributeError, - "not a material MTex object" ); + "attribute not available for a lamp MTex" ); if ( self->mtex->mapto & flag ) return PyInt_FromLong( ( self->mtex->maptoneg & flag ) ? -1 : 1 ); @@ -808,14 +855,25 @@ static PyObject *MTex_getMapToFlag( BPy_MTex *self, void *closure ) return PyInt_FromLong( 0 ); } +static PyObject *MTex_getWorldMapToFlag( BPy_MTex *self, void *closure ) +{ + int flag = GET_INT_FROM_POINTER(closure); + + if( self->type != ID_WO ) + return EXPP_ReturnPyObjError( PyExc_AttributeError, + "not a world MTex object" ); + + return PyInt_FromLong( (long)( (self->mtex->mapto & flag) != 0 ) ); +} + static int MTex_setMapToFlag( BPy_MTex *self, PyObject *value, void *closure) { int flag = GET_INT_FROM_POINTER(closure); int intVal; - if( self->type != ID_MA ) + if( self->type == ID_LA && flag != MAP_COL ) return EXPP_ReturnIntError( PyExc_AttributeError, - "not a material MTex object" ); + "attribute not available for a lamp MTex" ); if ( !PyInt_Check( value ) ) return EXPP_ReturnIntError( PyExc_TypeError, @@ -855,3 +913,31 @@ static int MTex_setMapToFlag( BPy_MTex *self, PyObject *value, void *closure) return 0; } + +static int MTex_setWorldMapToFlag( BPy_MTex *self, PyObject *value, void *closure) +{ + int flag = GET_INT_FROM_POINTER(closure); + + if( self->type != ID_WO ) + return EXPP_ReturnIntError( PyExc_AttributeError, + "attribute only available for a world MTex" ); + + if ( !PyInt_Check( value ) ) + return EXPP_ReturnIntError( PyExc_TypeError, + "expected an int"); + + switch( PyInt_AsLong( value ) ) { + case 0: + self->mtex->mapto &= ~flag; + break; + case 1: + self->mtex->mapto |= flag; + break; + default: + return EXPP_ReturnIntError( PyExc_ValueError, + "value for mapping must be 0 or 1" ); + } + + return 0; +} + diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index 80e4d8fce11..145629d0aaa 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -2456,10 +2456,13 @@ static int Material_setTextures( BPy_Material * self, PyObject * value ) /* check the list for valid entries */ for( i= 0; i < PySequence_Size(value) ; ++i ) { PyObject *item = PySequence_Fast_GET_ITEM( value, i ); - if( item != Py_None && !BPy_MTex_Check( item ) ) { + if( item == Py_None || ( BPy_MTex_Check( item ) && + ((BPy_MTex *)item)->type == ID_MA ) ) { + continue; + } else { Py_DECREF(value); return EXPP_ReturnIntError( PyExc_TypeError, - "expected tuple or list containing MTex objects and NONE" ); + "expected tuple or list containing material MTex objects and NONE" ); } } diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c index cc394801d88..141b36a05d6 100644 --- a/source/blender/python/api2_2x/Texture.c +++ b/source/blender/python/api2_2x/Texture.c @@ -42,6 +42,7 @@ #include "DNA_material_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" +#include "DNA_world_types.h" #include "MTex.h" #include "Image.h" @@ -1142,6 +1143,11 @@ static PyObject *M_Texture_TexCoDict( void ) PyConstant_Insert(d, "STICK", PyInt_FromLong(TEXCO_STICKY)); PyConstant_Insert(d, "STRESS", PyInt_FromLong(TEXCO_STRESS)); PyConstant_Insert(d, "TANGENT", PyInt_FromLong(TEXCO_TANGENT)); + + /* World TexCo Settings */ + PyConstant_Insert(d, "ANGMAP", PyInt_FromLong(TEXCO_ANGMAP)); + PyConstant_Insert(d, "HSPHERE", PyInt_FromLong(TEXCO_H_SPHEREMAP)); + PyConstant_Insert(d, "HTUBE", PyInt_FromLong(TEXCO_H_TUBEMAP)); } return TexCo; } diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c index 3901e8296fb..09f7baed348 100644 --- a/source/blender/python/api2_2x/World.c +++ b/source/blender/python/api2_2x/World.c @@ -47,6 +47,7 @@ #include "BKE_world.h" #include "BKE_main.h" #include "BKE_library.h" +#include "BKE_texture.h" #include "BLI_blenlib.h" #include "BSE_editipo.h" #include "BIF_space.h" @@ -55,6 +56,7 @@ #include "MTex.h" #include "gen_utils.h" #include "gen_library.h" +#include "MEM_guardedalloc.h" #define IPOKEY_ZENITH 0 #define IPOKEY_HORIZON 1 @@ -101,6 +103,7 @@ static PyObject *World_addScriptLink( BPy_World * self, PyObject * args ); static PyObject *World_clearScriptLinks( BPy_World * self, PyObject * args ); static PyObject *World_setCurrent( BPy_World * self ); static PyObject *World_getTextures( BPy_World * self ); +static int World_setTextures( BPy_World * self, PyObject * value ); static PyObject *World_copy( BPy_World * self ); @@ -252,7 +255,7 @@ static PyGetSetDef BPy_World_getseters[] = { "world mist settings", NULL}, {"ipo", (getter)World_getIpo, (setter)World_setIpo, "world ipo", NULL}, - {"textures", (getter)World_getTextures, (setter)NULL, + {"textures", (getter)World_getTextures, (setter)World_setTextures, "The World's texture list as a tuple", NULL}, {NULL,NULL,NULL,NULL,NULL} /* Sentinel */ @@ -1058,3 +1061,73 @@ static PyObject *World_getTextures( BPy_World * self ) return tuple; } + +static int World_setTextures( BPy_World * self, PyObject * value ) +{ + int i; + + if( !PyList_Check( value ) && !PyTuple_Check( value ) ) + return EXPP_ReturnIntError( PyExc_TypeError, + "expected tuple or list of integers" ); + + /* don't allow more than MAX_MTEX items */ + if( PySequence_Size(value) > MAX_MTEX ) + return EXPP_ReturnIntError( PyExc_AttributeError, + "size of sequence greater than number of allowed textures" ); + + /* get a fast sequence; in Python 2.5, this just return the original + * list or tuple and INCREFs it, so we must DECREF */ + value = PySequence_Fast( value, "" ); + + /* check the list for valid entries */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + if( item == Py_None || ( BPy_MTex_Check( item ) && + ((BPy_MTex *)item)->type == ID_WO ) ) { + continue; + } else { + Py_DECREF(value); + return EXPP_ReturnIntError( PyExc_TypeError, + "expected tuple or list containing world MTex objects and NONE" ); + } + } + + /* for each MTex object, copy to this structure */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + struct MTex *mtex = self->world->mtex[i]; + if( item != Py_None ) { + BPy_MTex *obj = (BPy_MTex *)item; + + /* if MTex is already at this location, just skip it */ + if( obj->mtex == mtex ) continue; + + /* create a new entry if needed, otherwise update reference count + * for texture that is being replaced */ + if( !mtex ) + mtex = self->world->mtex[i] = add_mtex( ); + else + mtex->tex->id.us--; + + /* copy the data */ + mtex->tex = obj->mtex->tex; + id_us_plus( &mtex->tex->id ); + mtex->texco = obj->mtex->texco; + mtex->mapto = obj->mtex->mapto; + } + } + + /* now go back and free any entries now marked as None */ + for( i= 0; i < PySequence_Size(value) ; ++i ) { + PyObject *item = PySequence_Fast_GET_ITEM( value, i ); + struct MTex *mtex = self->world->mtex[i]; + if( item == Py_None && mtex ) { + mtex->tex->id.us--; + MEM_freeN( mtex ); + self->world->mtex[i] = NULL; + } + } + + Py_DECREF(value); + return 0; +} diff --git a/source/blender/python/api2_2x/doc/Texture.py b/source/blender/python/api2_2x/doc/Texture.py index 223c5e6ebdd..b5b82b1a519 100644 --- a/source/blender/python/api2_2x/doc/Texture.py +++ b/source/blender/python/api2_2x/doc/Texture.py @@ -195,20 +195,23 @@ Example:: - DN_CELLNOISE - Steven Worley's cellular basis algorithm (1996) @var TexCo: Flags for MTex.texco. - - ORCO - Use the original coordinates of the mesh - - REFL - Use reflection vector as texture coordinates - - NOR - Use normal vector as texture coordinates + - ORCO - Use the original coordinates of the mesh (material texture only) + - REFL - Use reflection vector as texture coordinates (material texture only) + - NOR - Use normal vector as texture coordinates (material texture only) - GLOB - Use global coordinates for the texture coordinates - - UV - Use UV coordinates for texture coordinates + - UV - Use UV coordinates for texture coordinates (material texture only) - OBJECT - Use linked object's coordinates for texture coordinates - - WIN - Use screen coordinates as texture coordinates - - VIEW - Pass camera view vector on to the texture (World texture only!) - - STICK - Use mesh sticky coordinates for the texture coordinates - - STRESS - Use mesh stress coordinates for the texture coordinates - - TANGENT - Use mesh tangent coordinates for the texture coordinates + - WIN - Use screen coordinates as texture coordinates (material texture only) + - VIEW - Use view coordinates for the texture (world and lamp texture only) + - STICK - Use mesh sticky coordinates for the texture coordinates (material texture only) + - STRESS - Use mesh stress coordinates for the texture coordinates (material texture only) + - TANGENT - Use mesh tangent coordinates for the texture coordinates (material texture only) + - ANGMAP - Uses 360 degree angular coordinates, e.g. for spherical light probes (world texture only) + - HSPHERE - For 360 degree panorama sky, spherical mapped, only top half (world texture only) + - HTUBE - For 360 degree panorama sky, cylindrical mapped, only top half (world texture only) @type TexCo: readonly dictionary -@var MapTo: Flags for MTex.mapto. +@var MapTo: Flags for MTex.mapto - COL - Make the texture affect the basic color of the material - NOR - Make the texture affect the rendered normal - CSP - Make the texture affect the specularity color @@ -500,84 +503,92 @@ class MTex: This object links a material to a texture. It allows the same texture to be used in several different ways. - @type blendmode: int @ivar blendmode: Texture blending mode. See L{BlendModes} + @type blendmode: int + @ivar col: Color that the texture blends with. @type col: tuple - @ivar col: Color that the texture blends with. Range of. - @type colfac: float @ivar colfac: Factor by which texture affects color. - @ivar correctNor: Correct normal mapping for Texture space and Object space. + @type colfac: float + @ivar correctNor: Correct normal mapping for Texture space and Object space (material only). @type correctNor: boolean + @ivar dispfac: Factor by which texture affects displacement (material only). @type dispfac: float - @ivar dispfac: Factor by which texture affects displacement. - @type dvar: float @ivar dvar: Value that the texture blends with when not blending colors. + @type dvar: float + @ivar fromDupli: Duplis instanced from verts, faces or particles, inherit texture coordinate from their parent (material only). @type fromDupli: boolean - @ivar fromDupli: Duplis instanced from verts, faces or particles, inherit texture coordinate from their parent. + @ivar fromOrig: Duplis derive their object coordinates from the original objects transformation (material only). @type fromOrig: boolean - @ivar fromOrig: Duplis derive their object coordinates from the original objects transformation. + @ivar mapping: Mapping of texture coordinates (flat, cube, etc.) (material only). See L{Mappings}. @type mapping: int - @ivar mapping: Mapping of texture coordinates (flat, cube, etc.). See L{Mappings}. + @ivar mapto: "Map to" field of texture (material only). OR'd values of L{MapTo}. @type mapto: int - @ivar mapto: "Map to" field of texture. OR'd values of L{MapTo}. - @ivar mtAlpha: How texture maps to alpha value. - @type mtAlpha: int - @ivar mtAmb: How texture maps to ambient value. - @type mtAmb: int - @ivar mtCmir: How texture maps to mirror color. - @type mtCmir: int - @ivar mtCol: How texture maps to color. + @ivar mtCol: How texture maps to color (material and lamp only). @type mtCol: int - @ivar mtCsp: How texture maps to specularity color + @ivar mtAlpha: How texture maps to alpha value (material only). + @type mtAlpha: int + @ivar mtAmb: How texture maps to ambient value (material only). + @type mtAmb: int + @ivar mtCmir: How texture maps to mirror color (material only). + @type mtCmir: int + @ivar mtCsp: How texture maps to specularity color (material only). @type mtCsp: int - @ivar mtDisp: How texture maps to displacement + @ivar mtDisp: How texture maps to displacement (material only). @type mtDisp: int - @ivar mtEmit: How texture maps to emit value + @ivar mtEmit: How texture maps to emit value (material only). @type mtEmit: int - @ivar mtHard: How texture maps to hardness + @ivar mtHard: How texture maps to hardness (material only). @type mtHard: int - @ivar mtNor: How texture maps to normals + @ivar mtNor: How texture maps to normals (material only). @type mtNor: int - @ivar mtRayMir: How texture maps to RayMir value + @ivar mtRayMir: How texture maps to RayMir value (material only). @type mtRayMir: int - @ivar mtRef: How texture maps to reflectivity + @ivar mtRef: How texture maps to reflectivity (material only). @type mtRef: int - @ivar mtSpec: How texture maps to specularity + @ivar mtSpec: How texture maps to specularity (material only). @type mtSpec: int - @ivar mtTranslu: How texture maps to translucency + @ivar mtTranslu: How texture maps to translucency (material only). @type mtTranslu: int - @ivar mtWarp: How texture maps to warp + @ivar mtWarp: How texture maps to warp (material only). @type mtWarp: int - @ivar neg: Negate texture values mode + @ivar mtBlend: Texture affects color progression of background (world only). + @type mtBlend: int + @ivar mtHoriz: Texture affects color of the horizon (world only). + @type mtHoriz: int + @ivar mtZenUp: Texture affects color of the zenith above (world only). + @type mtZenUp: int + @ivar mtZenDown: Texture affects color of the zenith below (world only). + @type mtZenDown: int + @ivar neg: Negate texture values mode. @type neg: boolean - @ivar norfac: Factor by which texture affects normal + @ivar norfac: Factor by which texture affects normal (material and world only). @type norfac: float - @ivar noRGB: Convert texture RGB values to intensity values + @ivar noRGB: Convert texture RGB values to intensity values. @type noRGB: boolean - @ivar object: Object whose space to use when texco is Object + @ivar object: Object whose space to use when texco is Object. @type object: Blender Object or None + @ivar ofs: Offset to adjust texture space. @type ofs: tuple - @ivar ofs: Offset to adjust texture space + @ivar size: Size to scale texture space. @type size: tuple - @ivar size: Size to scale texture space - @ivar stencil: Stencil mode + @ivar stencil: Stencil mode. @type stencil: boolean @ivar tex: The Texture this is linked to. @type tex: Blender Texture - @ivar texco: Texture coordinates ("Map input"). See L{TexCo} + @ivar texco: Texture coordinates ("Map input"). See L{TexCo}. @type texco: int - @ivar uvlayer: The name of the UV Layer this texture is mapped to (when left blank uses render layer) + @ivar uvlayer: The name of the UV Layer this texture is mapped to (when left blank uses render layer) (material only). @type uvlayer: string + @ivar varfac: Factor by which texture affects most variables (material and world only). @type varfac: float - @ivar varfac: Factor by which texture affects most variables + @ivar warpfac: Factor by which texture affects warp (material only). @type warpfac: float - @ivar warpfac: Factor by which texture affects warp + @ivar xproj: Projection of X axis to Texture space (material only). See L{Proj} @type xproj: int - @ivar xproj: Projection of X axis to Texture space. See L{Proj} + @ivar yproj: Projection of Y axis to Texture space (material only). See L{Proj} @type yproj: int - @ivar yproj: Projection of Y axis to Texture space. See L{Proj} + @ivar zproj: Projection of Z axis to Texture space (material only). See L{Proj} @type zproj: int - @ivar zproj: Projection of Z axis to Texture space. See L{Proj} """ def getIpo():