Module Material :: Class Material
[frames] | no frames]

Class Material

The Material object

This object gives access to Materials in Blender.


Warning: Most member variables assume values in some [Min, Max] interval. When trying to set them, the given parameter will be clamped to lie in that range: if val < Min, then val = Min, if val > Max, then val = Max.

Instance Methods
string
getName()
Get the name of this Material object.
 
setName(name)
Set the name of this Material object.
Ipo
getIpo()
Get the Ipo associated with this material, if any.
 
setIpo(ipo)
Link an ipo to this material.
 
clearIpo()
Unlink the ipo from this material.
 
insertIpoKey(keytype)
Inserts keytype values in material ipo at curframe.
int
getMode()
Get this Material's mode flags.
 
setMode(param, stringN=None)
Set this Material's mode flags.
list of 3 floats
getRGBCol()
Get the rgb color triplet sequence.
 
setRGBCol(rgb=None)
Set the rgb color triplet sequence.
list of 3 floats
getSpecCol()
Get the specular color triplet sequence.
 
setSpecCol(rgb=None)
Set the specular color triplet sequence.
list of 3 floats
getMirCol()
Get the mirror color triplet sequence.
 
setMirCol(rgb=None)
Set the mirror color triplet sequence.
float
getAlpha()
Get the alpha (transparency) value.
 
setAlpha(alpha)
Set the alpha (transparency) value.
float
getAmb()
Get the ambient color blend factor.
 
setAmb(amb)
Set the ambient color blend factor.
float
getEmit()
Get the emitting light intensity.
 
setEmit(emit)
Set the emitting light intensity.
float
getRef()
Get the reflectivity value.
 
setRef(ref)
Set the reflectivity value.
float
getSpec()
Get the specularity value.
 
setSpec(spec)
Set the specularity value.
float
getSpecTransp()
Get the specular transparency.
 
setSpecTransp(spectransp)
Set the specular transparency.
 
setSpecShader(specShader)
Set the material's specular shader from one of the shaders in Material.Shaders dict.
int
getSpecShader(specShader)
Get the material's specular shader from one of the shaders in Material.Shaders dict.
 
setDiffuseShader(diffuseShader)
Set the material's diffuse shader from one of the shaders in Material.Shaders dict.
int
getDiffuseShader()
Get the material's diffuse shader from one of the shaders in Material.Shaders dict.
 
setRoughness(roughness)
Set the material's roughness (applies to the "Oren Nayar" Diffuse Shader only)
float
getRoughness()
Get the material's roughness (applies to the "Oren Nayar" Diffuse Shader only)
 
setSpecSize(diffuseSize)
Set the material's size of diffuse area (applies to the "Toon" Diffuse Shader only)
float
getSpecSize()
Get the material's size of diffuse area (applies to the "Toon" Diffuse Shader only)
 
setSpecSmooth(specSmooth)
Set the material's smoothing of specular area (applies to the "Toon" Specular Shader only)
float
getSpecSmooth()
Get the material's smoothing of specular area (applies to the "Toon" Specular Shader only)
 
setDiffuseSmooth(diffuseSmooth)
Set the material's smoothing of diffuse area (applies to the "Toon" Diffuse Shader only)
float
getDiffuseSmooth()
Get the material's smoothing of diffuse area (applies to the "Toon" Diffuse Shader only)
 
setDiffuseDarkness(diffuseDarkness)
Set the material's diffuse darkness (applies to the "Minnaert" Diffuse Shader only)
float
getDiffuseDarkness()
Get the material's diffuse darkness (applies to the "Minnaert" Diffuse Shader only)
 
setRefracIndex(refracIndex)
Set the material's Index of Refraction (applies to the "Blinn" Specular Shader only)
float
getRefracIndex()
Get the material's Index of Refraction (applies to the "Blinn" Specular Shader only)
 
setRms(rms)
Set the material's standard deviation of surface slope (applies to the "WardIso" Specular Shader only)
float
getRms()
Get the material's standard deviation of surface slope (applies to the "WardIso" Specular Shader only)
 
setFilter(filter)
Set the material's amount of filtering when transparent raytrace is enabled
float
getFilter()
Get the material's amount of filtering when transparent raytrace is enabled
 
setTranslucency(translucency)
Set the material's amount of diffuse shading of the back side
float
getTranslucency()
Get the material's amount of diffuse shading of the back side
float
getAdd()
Get the glow factor.
 
setAdd(add)
Set the glow factor.
float
getZOffset()
Get the artificial offset for faces with this Material.
 
setZOffset(zoffset)
Set the artificial offset for faces with this Material.
float
getHaloSize()
Get the halo size.
 
setHaloSize(halosize)
Set the halo size.
int
getHaloSeed()
Get the seed for random ring dimension and line location in halos.
 
setHaloSeed(haloseed)
Set the seed for random ring dimension and line location in halos.
float
getFlareSize()
Get the ratio: flareSize / haloSize.
 
setFlareSize(flaresize)
Set the ratio: flareSize / haloSize.
int
getFlareSeed()
Get flare's offset in the seed table.
 
setFlareSeed(flareseed)
Set flare's offset in the seed table.
float
getFlareBoost()
Get the flare's extra strength.
 
setFlareBoost(flareboost)
Set the flare's extra strength.
float
getSubSize()
Get the dimension of subflare, dots and circles.
 
setSubSize(subsize)
Set the dimension of subflare, dots and circles.
int
getHardness()
Get the hardness of the specularity.
 
setHardness(hardness)
Set the hardness of the specularity.
int
getNFlares()
Get the number of halo subflares.
 
setNFlares(nflares)
Set the number of halo subflares.
int
getNStars()
Get the number of points in the halo stars.
 
setNStars(nstars)
Set the number of points in the halo stars.
int
getNLines()
Get the number of star shaped lines on each halo.
 
setNLines(nlines)
Set the number of star shaped lines on each halo.
int
getNRings()
Get the number of rings on each halo.
 
setNRings(nrings)
Set the number of rings on each halo.
float
getRayMirr()
Get amount mirror reflection for raytrace.
 
setRayMirr(nrmirr)
Set amount mirror reflection for raytrace.
int
getRayMirrDepth()
Get amount of inter-reflections calculated maximal.
 
setRayMirrDepth(nrmirr)
Set amount mirror reflection for raytrace.
float
getFresnelMirr()
Get power of Fresnel for mirror reflection.
 
setFresnelMirr(nrmirr)
Set power of Fresnel for mirror reflection.
float
getFresnelMirrFac()
Get the number of Ray Mirror.
 
setFresnelMirrFac(nrmirr)
Set the number of ray mirror
float
getIOR()
Get the angular index of refraction for raytrace.
 
setIOR(nrmirr)
Set the angular index of refraction for raytrace.
int
getTransDepth()
Get amount of refractions calculated maximal.
 
setTransDepth(nrmirr)
Set amount of refractions calculated maximal.
float
getFresnelTrans()
Get power of Fresnel for transparency.
 
setFresnelTrans(nrmirr)
Set power of Fresnel for transparency.
float
getFresnelTransFac()
Get blending factor for Fresnel.
 
setFresnelTransFac(nrmirr)
Set blending factor for Fresnel.
 
setTexture(index, texture, texco, mapto)
Assign a Blender Texture object to channel number 'number'.
 
clearTexture(index)
Clear the ith (given by 'index') texture channel of this material.
list of MTex
getTextures()
Get this Material's Texture list.
list
getScriptLinks(event)
Get a list with this Material's script links of type 'event'.
 
clearScriptLinks(links=None)
Delete script links from this Material.
 
addScriptLink(text, event)
Add a new script link to this Material.
Material
__copy__()
Make a copy of this material
bool
freeNodes()
Removes the node tree from this material.
Instance Variables
float B
Diffuse color (rgbCol) blue component.
float G
Diffuse color (rgbCol) green component.
float IOR
Angular index of refraction for raytrace.
float R
Diffuse color (rgbCol) red component.
float add
Strength of the add effect.
float alpha
Alpha (translucency) component of the material.
float amb
Amount of global ambient color material receives.
float anisotropy
The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent).
list colorband
Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
list colorbandDiffuse
Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
float colorbandDiffuseFactor
Material Diffuse colorband factor.
int colorbandDiffuseInput
Material Diffuse colorband input.
int colorbandDiffuseMethod
Material Diffuse colorband method.
list colorbandSpecular
Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
float colorbandSpecularFactor
Material Specular colorband factor.
int colorbandSpecularInput
Material Specular colorband input.
int colorbandSpecularMethod
Material Specular colorband method.
float diffuseDarkness
Material's diffuse darkness ("Minnaert" diffuse shader only).
int diffuseShader
Diffuse shader type (see Shaders).
float diffuseSize
Material's diffuse area size ("Toon" diffuse shader only).
float diffuseSmooth
Material's diffuse area smoothing ("Toon" diffuse shader only).
float emit
Amount of light the material emits.
bool enableSSS
If True, subsurface scattering will be rendered on this material.
list of integers enabledTextures
The texture channels enabled in this material.
bool fakeUser
When set to True, this datablock wont be removed, even if nothing is using it.
float filter
Amount of filtering when transparent raytrace is enabled.
float flareBoost
Flare's extra strength.
int flareSeed
Offset in the flare seed table.
float flareSize
Ratio of flare size to halo size.
float fresnelDepth
Power of Fresnel for mirror reflection.
float fresnelDepthFac
Blending factor for Fresnel mirror.
float fresnelTrans
Power of Fresnel for transparency.
float fresnelTransFac
Blending factor for Fresnel transparency.
float glossMir
Amount of reflection glossy.
float glossTra
Amount of refraction glossy.
int haloSeed
Randomizes halo ring dimension and line location.
float haloSize
Dimension of the halo.
int hard
Hardness of the specularity.
Blender Ipo ipo
Material Ipo data.
string or None lib
path to the blend file this datablock is stored in (readonly).
Group or None lightGroup
Limits lights that affect this material to a group.
float mirB
Mirror color (mirCol) blue component.
list of 3 floats mirCol
Mirror RGB color triplet.
float mirG
Mirror color (mirCol) green component.
float mirR
Mirror color (mirCol) red component.
int mode
Mode mode bitfield.
int nFlares
Number of subflares with halo.
int nLines
Number of star-shaped lines with halo.
int nRings
Number of rings with halo.
int nStars
Number of star points with halo.
string name
unique name within each blend file.
list of 2 floats oopsLoc
Material OOPs location.
int oopsSel
Material OOPs selection flag.
IDGroup properties
Returns an IDGroup reference to this datablocks's ID Properties.
float rayMirr
Mirror reflection amount for raytrace.
int rayMirrDepth
Amount of raytrace inter-reflections.
float rbFriction
Rigid Body Friction coefficient.
float rbRestitution
Rigid Body Friction restitution.
float ref
Amount of reflections (for shader).
float refracIndex
Material's Index of Refraction (applies to the "Blinn" Specular Shader only.
list of 3 floats rgbCol
Diffuse RGB color triplet.
float rms
Material's surface slope standard deviation ("WardIso" specular shader only).
float roughness
Material's roughness ("Oren Nayar" diffuse shader only).
int sampGlossTra
Refraction glossy samples.
int sampGloss_mir
Reflection glossy samples.
float shadAlpha
Shadow Alpha for irregular shadow buffer.
int shadeMode
Shade mode bitfield.
float spec
Degree of specularity.
float specB
Specular color (specCol) blue component.
list of 3 floats specCol
Specular RGB color triplet.
float specG
Specular color (specCol) green component.
float specR
Specular color (specCol) red component.
int specShader
Specular shader type.
float specSize
Material's specular area size ("Toon" specular shader only).
float specSmooth
Sets the smoothness of specular toon area.
float specTransp
Makes specular areas opaque on transparent materials.
float sssB
SubSsurface scattering color (sssCol) blue component.
float sssBack
Back scattering weight Value is clamped to the range [0.0,10.0].
list of 3 floats sssCol
SubSsurface scattering RGB color triplet.
float sssColorBlend
Blend factor for SSS colors.
float sssError
Error allowance for the calculation (a low value is slower).
float sssFront
Front scattering weight.
float sssG
SubSsurface scattering color (sssCol) green component.
float sssIOR
Refraction index.
float sssR
SubSsurface scattering color (sssCol) red component.
float sssRadiusBlue
Mean blue scattering path length.
float sssRadiusGreen
Mean green scattering path length.
float sssRadiusRed
Mean red scattering path length.
bool sssScale
If True, subsurface scattering will be rendered on this material.
float sssTextureScatter
Texture scattering factor.
int strandBlendUnit
Use actual Blender units for widths instead of pixels
float strandDist
Distance in Blender units over which to blend in the surface normal
float strandEnd
End size of strands
float strandFade
Transparency along the width of the strand
float strandMin
Minimum size of strands in pixels
float strandShape
Shape of strands, positive value makes it rounder, negative makes it spiky
float strandStart
Start size of strands
int strandSurfDiff
Make diffuse shading more similar to shading the surface
int strandTanShad
Uses direction of strands as normal for tangent-shading
float subSize
Dimension of subflares, dots and circles.
bool tag
A temporary tag that to flag data as being used within a loop.
a tuple of Blender MTex objects. textures
the Material's Texture list.
float threshMir
Threshold below which reflections will not be computed.
float threshTra
threshold below which refractions will not be computed.
int transDepth
calculated maximal.
float translucency
Amount of diffuse shading of the back side.
int users
The number of users this datablock has.
string uvlayer
The uv layer name to use, when UV mapping is enabled.
float zOffset
Artificial offset in the Z buffer (for Ztransp option).
Method Details

setName(name)

 

Set the name of this Material object.

Parameters:
  • name (string) - The new name.

getIpo()

 

Get the Ipo associated with this material, if any.

Returns: Ipo
the wrapped ipo or None.

setIpo(ipo)

 

Link an ipo to this material.

Parameters:
  • ipo (Blender Ipo) - a material type ipo.

clearIpo()

 

Unlink the ipo from this material.

Returns:
True if there was an ipo linked or False otherwise.

insertIpoKey(keytype)

 

Inserts keytype values in material ipo at curframe. Uses module constants.

Parameters:
  • keytype (Integer) - -RGB -ALPHA -HALOSIZE -MODE -ALLCOLOR -ALLMIRROR -OFS -SIZE -ALLMAPPING
Returns:
py_none

getMode()

 

Get this Material's mode flags.

Returns: int
OR'ed value. Use the Modes dictionary to check which flags are 'on'.

Example:

       import Blender
       from Blender import Material
       flags = mymat.getMode()
       if flags & Material.Modes['HALO']:
               print "This material is rendered as a halo"
       else:
               print "Not a halo"

setMode(param, stringN=None)

 

Set this Material's mode flags. Up to 22 mode strings can be given and specify the modes which are turned 'on'. Those not provided are turned 'off', so mat.setMode() -- without arguments -- turns off all mode flags for Material mat. Valid mode strings are "Traceable", "Shadow", "Shadeless", "Wire", "VColLight", "VColPaint", "Halo", "ZTransp", "ZInvert", "HaloRings", "HaloLines", "OnlyShadow", "HaloXAlpha", "HaloStar", "TexFace", "HaloTex", "HaloPuno", "NoMist", "HaloShaded", "HaloFlare", "Radio", "RayMirr", "ZTransp", "RayTransp", "Env"

An integer can also be given, which directly sets the mode flag. The Modes dictionary keys can (and should) be added or ORed to specify which modes to turn 'on'. The value returned from getMode() can also be modified and input to this method.

Parameters:
  • param (string, None or int) - A mode value (int) or flag (string). Can also be None.
  • stringN (string) - A mode flag. Up to 22 flags can be set at the same time.

getRGBCol()

 

Get the rgb color triplet sequence.

Returns: list of 3 floats
[r, g, b]

setRGBCol(rgb=None)

 

Set the rgb color triplet sequence. If rgb is None, set the color to black.

Parameters:
  • rgb (three floats or a list of three floats) - The rgb color values in [0.0, 1.0] as:
    • a list of three floats: setRGBCol ([r, g, b]) or
    • three floats as separate parameters: setRGBCol (r,g,b).

getSpecCol()

 

Get the specular color triplet sequence.

Returns: list of 3 floats
[specR, specG, specB]

setSpecCol(rgb=None)

 

Set the specular color triplet sequence. If rgb is None, set the color to black.

Parameters:
  • rgb (three floats or a list of three floats) - The rgb color values in [0.0, 1.0] as:
    • a list of three floats: setSpecCol ([r, g, b]) or
    • three floats as separate parameters: setSpecCol (r,g,b).

getMirCol()

 

Get the mirror color triplet sequence.

Returns: list of 3 floats
[mirR, mirG, mirb]

setMirCol(rgb=None)

 

Set the mirror color triplet sequence. If rgb is None, set the color to black.

Parameters:
  • rgb (three floats or a list of three floats) - The rgb color values in [0.0, 1.0] as:
    • a list of three floats: setMirCol ([r, g, b]) or
    • three floats as separate parameters: setMirCol (r,g,b).

setAlpha(alpha)

 

Set the alpha (transparency) value.

Parameters:
  • alpha (float) - The new value in [0.0, 1.0].

setAmb(amb)

 

Set the ambient color blend factor.

Parameters:
  • amb (float) - The new value in [0.0, 1.0].

setEmit(emit)

 

Set the emitting light intensity.

Parameters:
  • emit (float) - The new value in [0.0, 1.0].

setRef(ref)

 

Set the reflectivity value.

Parameters:
  • ref (float) - The new value in [0.0, 1.0].

setSpec(spec)

 

Set the specularity value.

Parameters:
  • spec (float) - The new value in [0.0, 2.0].

setSpecTransp(spectransp)

 

Set the specular transparency.

Parameters:
  • spectransp (float) - The new value in [0.0, 1.0].

setSpecShader(specShader)

 

Set the material's specular shader from one of the shaders in Material.Shaders dict.

Parameters:
  • specShader (int) - The new value in [0, 4].

setDiffuseShader(diffuseShader)

 

Set the material's diffuse shader from one of the shaders in Material.Shaders dict.

Parameters:
  • diffuseShader (int) - The new value in [0, 3].

setRoughness(roughness)

 

Set the material's roughness (applies to the "Oren Nayar" Diffuse Shader only)

Parameters:
  • roughness (float) - The new value in [0.0, 3.14].

setSpecSize(diffuseSize)

 

Set the material's size of diffuse area (applies to the "Toon" Diffuse Shader only)

Parameters:
  • diffuseSize (float) - The new value in [0.0, 3.14].

setSpecSmooth(specSmooth)

 

Set the material's smoothing of specular area (applies to the "Toon" Specular Shader only)

Parameters:
  • specSmooth (float) - The new value in [0.0, 1.0].

setDiffuseSmooth(diffuseSmooth)

 

Set the material's smoothing of diffuse area (applies to the "Toon" Diffuse Shader only)

Parameters:
  • diffuseSmooth (float) - The new value in [0.0, 1.0].

setDiffuseDarkness(diffuseDarkness)

 

Set the material's diffuse darkness (applies to the "Minnaert" Diffuse Shader only)

Parameters:
  • diffuseDarkness (float) - The new value in [0.0, 2.0].

setRefracIndex(refracIndex)

 

Set the material's Index of Refraction (applies to the "Blinn" Specular Shader only)

Parameters:
  • refracIndex (float) - The new value in [1.0, 10.0].

setRms(rms)

 

Set the material's standard deviation of surface slope (applies to the "WardIso" Specular Shader only)

Parameters:
  • rms (float) - The new value in [0.0, 0.4].

setFilter(filter)

 

Set the material's amount of filtering when transparent raytrace is enabled

Parameters:
  • filter (float) - The new value in [0.0, 1.0].

setTranslucency(translucency)

 

Set the material's amount of diffuse shading of the back side

Parameters:
  • translucency (float) - The new value in [0.0, 1.0].

setAdd(add)

 

Set the glow factor.

Parameters:
  • add (float) - The new value in [0.0, 1.0].

setZOffset(zoffset)

 

Set the artificial offset for faces with this Material.

Parameters:
  • zoffset (float) - The new value in [0.0, 10.0].

setHaloSize(halosize)

 

Set the halo size.

Parameters:
  • halosize (float) - The new value in [0.0, 100.0].

setHaloSeed(haloseed)

 

Set the seed for random ring dimension and line location in halos.

Parameters:
  • haloseed (int) - The new value in [0, 255].

setFlareSize(flaresize)

 

Set the ratio: flareSize / haloSize.

Parameters:
  • flaresize (float) - The new value in [0.1, 25.0].

setFlareSeed(flareseed)

 

Set flare's offset in the seed table.

Parameters:
  • flareseed (int) - The new value in [0, 255].

setFlareBoost(flareboost)

 

Set the flare's extra strength.

Parameters:
  • flareboost (float) - The new value in [0.1, 10.0].

setSubSize(subsize)

 

Set the dimension of subflare, dots and circles.

Parameters:
  • subsize (float) - The new value in [0.1, 25.0].

setHardness(hardness)

 

Set the hardness of the specularity.

Parameters:
  • hardness (int) - The new value in [1, 511].

setNFlares(nflares)

 

Set the number of halo subflares.

Parameters:
  • nflares (int) - The new value in [1, 32].

setNStars(nstars)

 

Set the number of points in the halo stars.

Parameters:
  • nstars (int) - The new value in [3, 50].

setNLines(nlines)

 

Set the number of star shaped lines on each halo.

Parameters:
  • nlines (int) - The new value in [0, 250].

setNRings(nrings)

 

Set the number of rings on each halo.

Parameters:
  • nrings (int) - The new value in [0, 24].

setRayMirr(nrmirr)

 

Set amount mirror reflection for raytrace.

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setRayMirrDepth(nrmirr)

 

Set amount mirror reflection for raytrace.

Parameters:
  • nrmirr (int) - The new value in [0.0, 1.0].

setFresnelMirr(nrmirr)

 

Set power of Fresnel for mirror reflection.

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setFresnelMirrFac(nrmirr)

 

Set the number of ray mirror

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setIOR(nrmirr)

 

Set the angular index of refraction for raytrace.

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setTransDepth(nrmirr)

 

Set amount of refractions calculated maximal.

Parameters:
  • nrmirr (int) - The new value in [0.0, 1.0].

setFresnelTrans(nrmirr)

 

Set power of Fresnel for transparency.

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setFresnelTransFac(nrmirr)

 

Set blending factor for Fresnel.

Parameters:
  • nrmirr (float) - The new value in [0.0, 1.0].

setTexture(index, texture, texco, mapto)

 

Assign a Blender Texture object to channel number 'number'.

Parameters:
  • index (int) - material's texture index in [0, 9].
  • texture (Blender Texture) - a Blender Texture object.
  • texco (int) - optional ORed bitflag -- defaults to TexCo.ORCO. See TexCo var in Texture.
  • mapto (int) - optional ORed bitflag -- defaults to MapTo.COL. See MapTo var in Texture.

clearTexture(index)

 

Clear the ith (given by 'index') texture channel of this material.

Parameters:
  • index (int) - material's texture channel index in [0, 9].

getTextures()

 

Get this Material's Texture list.

Returns: list of MTex
a list of Blender MTex objects. None is returned for each empty texture channel.

getScriptLinks(event)

 

Get a list with this Material's script links of type 'event'.

Parameters:
  • event (string) - "FrameChanged" or "Redraw".
Returns: list
a list with Blender Text names (the script links of the given 'event' type) or None if there are no script links at all.

clearScriptLinks(links=None)

 

Delete script links from this Material. If no list is specified, all script links are deleted.

Parameters:
  • links (list of strings) - None (default) or a list of Blender Text names.

addScriptLink(text, event)

 

Add a new script link to this Material.

Parameters:
  • text (string) - the name of an existing Blender Text.
  • event (string) - "FrameChanged" or "Redraw".

__copy__()

 

Make a copy of this material

Returns: Material
a copy of this material

freeNodes()

 

Removes the node tree from this material.

Returns: bool
true if nodes were freed from this material.

Instance Variable Details

B

Diffuse color (rgbCol) blue component. Value is clamped to the range [0.0,1.0].
Type:
float

G

Diffuse color (rgbCol) green component. Value is clamped to the range [0.0,1.0].
Type:
float

IOR

Angular index of refraction for raytrace. Value is clamped to the range [1.0,3.0].
Type:
float

R

Diffuse color (rgbCol) red component. Value is clamped to the range [0.0,1.0].
Type:
float

add

Strength of the add effect. Value is clamped to the range [0.0,1.0].
Type:
float

alpha

Alpha (translucency) component of the material. Value is clamped to the range [0.0,1.0].
Type:
float

amb

Amount of global ambient color material receives. Value is clamped to the range [0.0,1.0].
Type:
float

anisotropy

The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent). Value is clamped to the range [0.0,1.0].
Type:
float

colorband

Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos]. The colorband can have between 1 and 31 colors.
Type:
list

colorbandDiffuse

Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos]. The colorband can have between 1 and 31 colors.
Type:
list

colorbandDiffuseFactor

Material Diffuse colorband factor. Value is clamped to the range [0.0,1.0].
Type:
float

colorbandDiffuseInput

Material Diffuse colorband input. The integer result must be compared with ColorbandInput dictionary.
Type:
int

colorbandDiffuseMethod

Material Diffuse colorband method. The integer result must be compared with ColorbandMethod dictionary.
Type:
int

colorbandSpecular

Material colorband, a list of colors, each color a list of 5 floats [0 - 1], [r,g,b,a,pos]. The colorband can have between 1 and 31 colors.
Type:
list

colorbandSpecularFactor

Material Specular colorband factor. Value is clamped to the range [0.0,1.0].
Type:
float

colorbandSpecularInput

Material Specular colorband input. The integer result must be compared with ColorbandInput dictionary.
Type:
int

colorbandSpecularMethod

Material Specular colorband method. The integer result must be compared with ColorbandMethod dictionary.
Type:
int

diffuseDarkness

Material's diffuse darkness ("Minnaert" diffuse shader only). Value is clamped to the range [0.0,2.0].
Type:
float

diffuseShader

Diffuse shader type (see Shaders). Value must be in the range [0,3].
Type:
int

diffuseSize

Material's diffuse area size ("Toon" diffuse shader only). Value is clamped to the range [0.0,3.14].
Type:
float

diffuseSmooth

Material's diffuse area smoothing ("Toon" diffuse shader only). Value is clamped to the range [0.0,1.0].
Type:
float

emit

Amount of light the material emits. Value is clamped to the range [0.0,1.0].
Type:
float

enabledTextures

The texture channels enabled in this material. The attribute returns is list of integers in the range [0, 9], each number representing the respective enabled MTex entry (see getTextures()). Enabling is done by assigning a list of ints or an empty list. Attempting to enable a channel which does not have a texture assigned to it will result in a ValueError exception. Example:
       mat.enabledTextures = []  # no texture channels are enabled
       mat.enabledTextures = [0, 6] # texture channels 0 and 6 are enabled
       ch = mat.enabledTextures
       ch.append(4)
       mat.enabledTextures = ch
       print mat.enabledTextures # will print: [0, 4, 6]
Type:
list of integers

fakeUser

When set to True, this datablock wont be removed, even if nothing is using it. All data has this disabled by default except for Actions.
Type:
bool

filter

Amount of filtering when transparent raytrace is enabled. Value is clamped to the range [0.0,1.0].
Type:
float

flareBoost

Flare's extra strength. Value is clamped to the range [0.1,1.0].
Type:
float

flareSeed

Offset in the flare seed table. Value is clamped to the range [1,255].
Type:
int

flareSize

Ratio of flare size to halo size. Value is clamped to the range [0.1,25.0].
Type:
float

fresnelDepth

Power of Fresnel for mirror reflection. Value is clamped to the range [0.0,5.0].
Type:
float

fresnelDepthFac

Blending factor for Fresnel mirror. Value is clamped to the range [1.0,5.0].
Type:
float

fresnelTrans

Power of Fresnel for transparency. Value is clamped to the range [0.0,5.0].
Type:
float

fresnelTransFac

Blending factor for Fresnel transparency. Value is clamped to the range [1.0,5.0].
Type:
float

glossMir

Amount of reflection glossy. Value is clamped to the range [0.0,1.0].
Type:
float

glossTra

Amount of refraction glossy. Value is clamped to the range [0.0,1.0].
Type:
float

haloSeed

Randomizes halo ring dimension and line location. Value is clamped to the range [1,255].
Type:
int

haloSize

Dimension of the halo. Value is clamped to the range [0.0,100.0].
Type:
float

hard

Hardness of the specularity. Value is clamped to the range [1,511].
Type:
int

ipo

Material Ipo data. Contains the Ipo if one is assigned to the object, None otherwise. Setting to None clears the current Ipo.
Type:
Blender Ipo

lib

path to the blend file this datablock is stored in (readonly).

lib will be None unless you are using external blend files with (File, Append/Link)

Note: the path may be relative, to get the full path use Blender.sys.expandpath

Type:
string or None

mirB

Mirror color (mirCol) blue component. Value is clamped to the range [0.0,1.0].
Type:
float

mirCol

Mirror RGB color triplet. Components are clamped to the range [0.0,1.0].
Type:
list of 3 floats

mirG

Mirror color (mirCol) green component. Value is clamped to the range [0.0,1.0].
Type:
float

mirR

Mirror color (mirCol) red component. Value is clamped to the range [0.0,1.0].
Type:
float

mode

Mode mode bitfield. See the Modes dictionary keys and descriptions.
Type:
int

nFlares

Number of subflares with halo. Value is clamped to the range [1,32].
Type:
int

nLines

Number of star-shaped lines with halo. Value is clamped to the range [0,250].
Type:
int

nRings

Number of rings with halo. Value is clamped to the range [0,24].
Type:
int

nStars

Number of star points with halo. Value is clamped to the range [3,50].
Type:
int

name

unique name within each blend file.

The name is case sensitive and 21 characters maximum length.

Note: a blend file may have naming collisions when external library data is used, be sure to check the value of lib.

Note: Setting a value longer then 21 characters will be shortened

Type:
string

oopsLoc

Material OOPs location. Returns None if material not found in list.
Type:
list of 2 floats

oopsSel

Material OOPs selection flag. Value must be in the range [0,1].
Type:
int

rayMirr

Mirror reflection amount for raytrace. Value is clamped to the range [0.0,1.0].
Type:
float

rayMirrDepth

Amount of raytrace inter-reflections. Value is clamped to the range [0,10].
Type:
int

rbFriction

Rigid Body Friction coefficient. Value is clamped to the range [0.0,100.0].
Type:
float

rbRestitution

Rigid Body Friction restitution. Value is clamped to the range [0.0,1.0].
Type:
float

ref

Amount of reflections (for shader). Value is clamped to the range [0.0,1.0].
Type:
float

refracIndex

Material's Index of Refraction (applies to the "Blinn" Specular Shader only. Value is clamped to the range [1.0,10.0].
Type:
float

rgbCol

Diffuse RGB color triplet. Components are clamped to the range [0.0,1.0].
Type:
list of 3 floats

rms

Material's surface slope standard deviation ("WardIso" specular shader only). Value is clamped to the range [0.0,0.4].
Type:
float

roughness

Material's roughness ("Oren Nayar" diffuse shader only). Value is clamped to the range [0.0,3.14].
Type:
float

sampGlossTra

Refraction glossy samples. Value is clamped to the range [1,1024].
Type:
int

sampGloss_mir

Reflection glossy samples. Value is clamped to the range [1,1024].
Type:
int

shadAlpha

Shadow Alpha for irregular shadow buffer. Value is clamped to the range [0.0,1.0].
Type:
float

shadeMode

Shade mode bitfield. See the ShadeModes dictionary keys and descriptions.
Type:
int

spec

Degree of specularity. Value is clamped to the range [0.0,2.0].
Type:
float

specB

Specular color (specCol) blue component. Value is clamped to the range [0.0,1.0].
Type:
float

specCol

Specular RGB color triplet. Components are clamped to the range [0.0,1.0].
Type:
list of 3 floats

specG

Specular color (specCol) green component. Value is clamped to the range [0.0,1.0].
Type:
float

specR

Specular color (specCol) red component. Value is clamped to the range [0.0,1.0].
Type:
float

specShader

Specular shader type. See Shaders. Value must be in the range [0,4].
Type:
int

specSize

Material's specular area size ("Toon" specular shader only). Value is clamped to the range [0.0,1.53].
Type:
float

specSmooth

Sets the smoothness of specular toon area. Value is clamped to the range [0.0,1.0].
Type:
float

specTransp

Makes specular areas opaque on transparent materials. Value is clamped to the range [0.0,1.0].
Type:
float

sssB

SubSsurface scattering color (sssCol) blue component. Value is clamped to the range [0.0,1.0].
Type:
float

sssCol

SubSsurface scattering RGB color triplet. Components are clamped to the range [0.0,1.0].
Type:
list of 3 floats

sssColorBlend

Blend factor for SSS colors. Value is clamped to the range [0.0,1.0].
Type:
float

sssError

Error allowance for the calculation (a low value is slower). Value is clamped to the range [0.0,10.0].
Type:
float

sssFront

Front scattering weight. Value is clamped to the range [0.0,2.0].
Type:
float

sssG

SubSsurface scattering color (sssCol) green component. Value is clamped to the range [0.0,1.0].
Type:
float

sssIOR

Refraction index. Value is clamped to the range [0.1,2.0].
Type:
float

sssR

SubSsurface scattering color (sssCol) red component. Value is clamped to the range [0.0,1.0].
Type:
float

sssRadiusBlue

Mean blue scattering path length. Value is clamped to the range [0.0,10000.0].
Type:
float

sssRadiusGreen

Mean green scattering path length. Value is clamped to the range [0.0,10000.0].
Type:
float

sssRadiusRed

Mean red scattering path length. Value is clamped to the range [0.0,10000.0].
Type:
float

sssScale

If True, subsurface scattering will be rendered on this material. Value is clamped to the range [0.1,1000.0].
Type:
bool

sssTextureScatter

Texture scattering factor. Value is clamped to the range [0.0,1.0].
Type:
float

subSize

Dimension of subflares, dots and circles. Value is clamped to the range [0.1,25.0].
Type:
float

tag

A temporary tag that to flag data as being used within a loop. always set all tags to True or False before using since blender uses this flag for its own internal operations.
Type:
bool

textures

the Material's Texture list. Empty texture channels contains None.
Type:
a tuple of Blender MTex objects.

threshMir

Threshold below which reflections will not be computed. Value is clamped to the range [0.0,1.0].
Type:
float

threshTra

threshold below which refractions will not be computed. Value is clamped to the range [0.0,1.0].
Type:
float

transDepth

calculated maximal. Amount of refractions for raytrace. Value is clamped to the range [0,10].
Type:
int

translucency

Amount of diffuse shading of the back side. Value is clamped to the range [0.0,1.0].
Type:
float

users

The number of users this datablock has. (readonly) Zero user datablocks are de-allocated after reloading and saving.
Type:
int

zOffset

Artificial offset in the Z buffer (for Ztransp option). Value is clamped to the range [0.0,10.0].
Type:
float