Texture

This module provides access to Texture objects in
Blender.

Example:

from Blender import Texture,Image,Material
footex = Texture.Get('foo') # get texture named 'foo'
footex.setType('Image') # make foo be an image texture
img = Image.Load('test.png') # load an image
footex.image = img # link the image to the texture
mat = Material.Get('bar') # get a material
mtextures = mat.getTextures() # get a list of the MTex objects
for mtex in mtextures:
if mtex.tex.type == Texture.Types.IMAGE:
print mtex.tex.image.filename # print the filenames of all the
# images in textures linked to "bar"
mat.setTexture(0, footex) # set the material's first texture
# to be our texture

WARP - Make the texture affect texture coordinates for the following
textures

Type:

readonly dictionary

Mappings

The available 2D texture coordinate mappings for images:

FLAT - flat projection

CUBE - cube projection

TUBE - cylindrical projection

SPHERE - spherical projection

Type:

readonly dictionary

Noise

Noise types and bases. SINE, SAW and TRI are only used for marble and
wood textures, while the remainder are used for all textures which has a
noise basis function (for these textures, the constant should be used
with the second noise basis setting).

SINE - Produce bands using sine wave (marble, wood textures)

SAW - Produce bands using saw wave (marble, wood textures)

TRI - Produce bands using triangle wave (marble, wood textures)

BLENDER - Original Blender algorithm

PERLIN - Ken Perlin's original (1985) algorithm

IMPROVEDPERLIN - Ken Perlin's newer (2002) algorithm

VORONOIF1 - none

VORONOIF2 - none

VORONOIF3 - none

VORONOIF4 - none

VORONOIF2F1 - none

VORONOICRACKLE - none

CELLNOISE - Steven Worley's cellular basis algorithm (1996)

Type:

readonly dictionary

Proj

The available projections per axis:

NONE - axis isn't used

X - axis is used as final x axis

Y - axis is used as final y axis

Z - axis is used as final z axis

Type:

readonly dictionary

STypes

Texture-type specific data. Depending on the value of Texture.type,
certain groups will make sense. For instance, when a texture is of type
CLOUD, the CLD_xxx stypes can be used. Note that the first value in each
group is the default.

Clouds type

CLD_DEFAULT - Monochromatic noise

CLD_COLOR - RGB noise

Wood type

WOD_BANDS - Use standard wood texture

WOD_RINGS - Use wood rings

WOD_BANDNOISE - Add noise to standard wood

WOD_RINGNOISE - Add noise to rings

Magic type

MAG_DEFAULT - Magic has no STypes

Marble type

MBL_SOFT - Use soft marble

MBL_SHARP - Use more clearly defined marble

MBL_SHARPER - Use very clearly dfefined marble

Blend type

BLN_LIN - Use a linear progression

BLN_QUAD - Use a quadratic progression

BLN_EASE - Uses a more complicated blend function

BLN_DIAG - Use a diagonal progression

BLN_SPHERE - Use a progression with the shape of a sphere

BLN_HALO - Use a quadratic progression with the shape of a sphere

Stucci type

STC_PLASTIC - Standard stucci

STC_WALLIN - Creates dimples

STC_WALLOUT - Creates ridges

Noise type

NSE_DEFAULT - Noise has no STypes

Image type

IMG_DEFAULT - Image has no STypes

Plugin type

PLG_DEFAULT - Plugin has no STypes

Envmap type

ENV_STATIC - Calculate map only once

ENV_ANIM - Calculate map each rendering

ENV_LOAD - Load map from disk

Musgrave type

MUS_MFRACTAL - Hetero Multifractal

MUS_RIDGEDMF - Ridged Multifractal

MUS_HYBRIDMF - Hybrid Multifractal

MUS_FBM - Fractal Brownian Motion

MUS_HTERRAIN - Hetero Terrain

Voronoi type

VN_INT - Only calculate intensity

VN_COL1 - Color cells by position

VN_COL2 - Same as Col1 plus outline based on F2-F1

VN_COL3 - Same as Col2 multiplied by intensity

Distorted noise type

DN_BLENDER - Original Blender algorithm

DN_PERLIN - Ken Perlin's original (1985) algorithm

DN_IMPROVEDPERLIN - Ken Perlin's newer (2002) algorithm

DN_VORONOIF1 - none

DN_VORONOIF2 - none

DN_VORONOIF3 - none

DN_VORONOIF4 - none

DN_VORONOIF2F1 - none

DN_VORONOICRACKLE - none

DN_CELLNOISE - Steven Worley's cellular basis algorithm (1996)

Type:

readonly dictionary

TexCo

Flags for MTex.texco.

ORCO - Use the original coordinates of the mesh (material texture
only)