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

Class Material

source code

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 [hide private]
string
getName()
Get the name of this Material object.
source code
 
setName(name)
Set the name of this Material object.
source code
Ipo
getIpo()
Get the Ipo associated with this material, if any.
source code
 
setIpo(ipo)
Link an ipo to this material.
source code
 
clearIpo()
Unlink the ipo from this material.
source code
 
insertIpoKey(keytype)
Inserts keytype values in material ipo at curframe.
source code
int
getMode()
Get this Material's mode flags.
source code
 
setMode(param, stringN=None)
Set this Material's mode flags.
source code
list of 3 floats
getRGBCol()
Get the rgb color triplet sequence.
source code
 
setRGBCol(rgb=None)
Set the rgb color triplet sequence.
source code
list of 3 floats
getSpecCol()
Get the specular color triplet sequence.
source code
 
setSpecCol(rgb=None)
Set the specular color triplet sequence.
source code
list of 3 floats
getMirCol()
Get the mirror color triplet sequence.
source code
 
setMirCol(rgb=None)
Set the mirror color triplet sequence.
source code
float
getAlpha()
Get the alpha (transparency) value.
source code
 
setAlpha(alpha)
Set the alpha (transparency) value.
source code
float
getAmb()
Get the ambient color blend factor.
source code
 
setAmb(amb)
Set the ambient color blend factor.
source code
float
getEmit()
Get the emitting light intensity.
source code
 
setEmit(emit)
Set the emitting light intensity.
source code
float
getRef()
Get the reflectivity value.
source code
 
setRef(ref)
Set the reflectivity value.
source code
float
getSpec()
Get the specularity value.
source code
 
setSpec(spec)
Set the specularity value.
source code
float
getSpecTransp()
Get the specular transparency.
source code
 
setSpecTransp(spectransp)
Set the specular transparency.
source code
 
setSpecShader(specShader)
Set the material's specular shader from one of the shaders in Material.Shaders dict.
source code
int
getSpecShader(specShader)
Get the material's specular shader from one of the shaders in Material.Shaders dict.
source code
 
setDiffuseShader(diffuseShader)
Set the material's diffuse shader from one of the shaders in Material.Shaders dict.
source code
int
getDiffuseShader()
Get the material's diffuse shader from one of the shaders in Material.Shaders dict.
source code
 
setRoughness(roughness)
Set the material's roughness (applies to the "Oren Nayar" Diffuse Shader only)
source code
float
getRoughness()
Get the material's roughness (applies to the "Oren Nayar" Diffuse Shader only)
source code
 
setSpecSize(diffuseSize)
Set the material's size of diffuse area (applies to the "Toon" Diffuse Shader only)
source code
float
getSpecSize()
Get the material's size of diffuse area (applies to the "Toon" Diffuse Shader only)
source code
 
setSpecSmooth(specSmooth)
Set the material's smoothing of specular area (applies to the "Toon" Specular Shader only)
source code
float
getSpecSmooth()
Get the material's smoothing of specular area (applies to the "Toon" Specular Shader only)
source code
 
setDiffuseSmooth(diffuseSmooth)
Set the material's smoothing of diffuse area (applies to the "Toon" Diffuse Shader only)
source code
float
getDiffuseSmooth()
Get the material's smoothing of diffuse area (applies to the "Toon" Diffuse Shader only)
source code
 
setDiffuseDarkness(diffuseDarkness)
Set the material's diffuse darkness (applies to the "Minnaert" Diffuse Shader only)
source code
float
getDiffuseDarkness()
Get the material's diffuse darkness (applies to the "Minnaert" Diffuse Shader only)
source code
 
setRefracIndex(refracIndex)
Set the material's Index of Refraction (applies to the "Blinn" Specular Shader only)
source code
float
getRefracIndex()
Get the material's Index of Refraction (applies to the "Blinn" Specular Shader only)
source code
 
setRms(rms)
Set the material's standard deviation of surface slope (applies to the "WardIso" Specular Shader only)
source code
float
getRms()
Get the material's standard deviation of surface slope (applies to the "WardIso" Specular Shader only)
source code
 
setFilter(filter)
Set the material's amount of filtering when transparent raytrace is enabled
source code
float
getFilter()
Get the material's amount of filtering when transparent raytrace is enabled
source code
 
setTranslucency(translucency)
Set the material's amount of diffuse shading of the back side
source code
float
getTranslucency()
Get the material's amount of diffuse shading of the back side
source code
float
getAdd()
Get the glow factor.
source code
 
setAdd(add)
Set the glow factor.
source code
float
getZOffset()
Get the artificial offset for faces with this Material.
source code
 
setZOffset(zoffset)
Set the artificial offset for faces with this Material.
source code
float
getHaloSize()
Get the halo size.
source code
 
setHaloSize(halosize)
Set the halo size.
source code
int
getHaloSeed()
Get the seed for random ring dimension and line location in halos.
source code
 
setHaloSeed(haloseed)
Set the seed for random ring dimension and line location in halos.
source code
float
getFlareSize()
Get the ratio: flareSize / haloSize.
source code
 
setFlareSize(flaresize)
Set the ratio: flareSize / haloSize.
source code
int
getFlareSeed()
Get flare's offset in the seed table.
source code
 
setFlareSeed(flareseed)
Set flare's offset in the seed table.
source code
float
getFlareBoost()
Get the flare's extra strength.
source code
 
setFlareBoost(flareboost)
Set the flare's extra strength.
source code
float
getSubSize()
Get the dimension of subflare, dots and circles.
source code
 
setSubSize(subsize)
Set the dimension of subflare, dots and circles.
source code
int
getHardness()
Get the hardness of the specularity.
source code
 
setHardness(hardness)
Set the hardness of the specularity.
source code
int
getNFlares()
Get the number of halo subflares.
source code
 
setNFlares(nflares)
Set the number of halo subflares.
source code
int
getNStars()
Get the number of points in the halo stars.
source code
 
setNStars(nstars)
Set the number of points in the halo stars.
source code
int
getNLines()
Get the number of star shaped lines on each halo.
source code
 
setNLines(nlines)
Set the number of star shaped lines on each halo.
source code
int
getNRings()
Get the number of rings on each halo.
source code
 
setNRings(nrings)
Set the number of rings on each halo.
source code
float
getRayMirr()
Get amount mirror reflection for raytrace.
source code
 
setRayMirr(nrmirr)
Set amount mirror reflection for raytrace.
source code
int
getRayMirrDepth()
Get amount of inter-reflections calculated maximal.
source code
 
setRayMirrDepth(nrmirr)
Set amount mirror reflection for raytrace.
source code
float
getFresnelMirr()
Get power of Fresnel for mirror reflection.
source code
 
setFresnelMirr(nrmirr)
Set power of Fresnel for mirror reflection.
source code
float
getFresnelMirrFac()
Get the number of Ray Mirror.
source code
 
setFresnelMirrFac(nrmirr)
Set the number of ray mirror
source code
float
getIOR()
Get the angular index of refraction for raytrace.
source code
 
setIOR(nrmirr)
Set the angular index of refraction for raytrace.
source code
int
getTransDepth()
Get amount of refractions calculated maximal.
source code
 
setTransDepth(nrmirr)
Set amount of refractions calculated maximal.
source code
float
getFresnelTrans()
Get power of Fresnel for transparency.
source code
 
setFresnelTrans(nrmirr)
Set power of Fresnel for transparency.
source code
float
getFresnelTransFac()
Get blending factor for Fresnel.
source code
 
setFresnelTransFac(nrmirr)
Set blending factor for Fresnel.
source code
 
setTexture(index, texture, texco, mapto)
Assign a Blender Texture object to channel number 'number'.
source code
 
clearTexture(index)
Clear the ith (given by 'index') texture channel of this material.
source code
list of MTex
getTextures()
Get this Material's Texture list.
source code
list
getScriptLinks(event)
Get a list with this Material's script links of type 'event'.
source code
 
clearScriptLinks(links=None)
Delete script links from this Material.
source code
 
addScriptLink(text, event)
Add a new script link to this Material.
source code
Material
__copy__()
Make a copy of this material
source code
bool
freeNodes()
Removes the node tree from this material.
source code
Instance Variables [hide private]
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.
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.
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.
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.
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 [hide private]

setName(name)

source code 

Set the name of this Material object.

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

getIpo()

source code 

Get the Ipo associated with this material, if any.

Returns: Ipo
the wrapped ipo or None.

setIpo(ipo)

source code 

Link an ipo to this material.

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

clearIpo()

source code 

Unlink the ipo from this material.

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

insertIpoKey(keytype)

source code 

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()

source code 

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)

source code 

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()

source code 

Get the rgb color triplet sequence.

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

setRGBCol(rgb=None)

source code 

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()

source code 

Get the specular color triplet sequence.

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

setSpecCol(rgb=None)

source code 

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()

source code 

Get the mirror color triplet sequence.

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

setMirCol(rgb=None)

source code 

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)

source code 

Set the alpha (transparency) value.

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

setAmb(amb)

source code 

Set the ambient color blend factor.

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

setEmit(emit)

source code 

Set the emitting light intensity.

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

setRef(ref)

source code 

Set the reflectivity value.

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

setSpec(spec)

source code 

Set the specularity value.

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

setSpecTransp(spectransp)

source code 

Set the specular transparency.

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

setSpecShader(specShader)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

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)

source code 

Set the glow factor.

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

setZOffset(zoffset)

source code 

Set the artificial offset for faces with this Material.

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

setHaloSize(halosize)

source code 

Set the halo size.

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

setHaloSeed(haloseed)

source code 

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

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

setFlareSize(flaresize)

source code 

Set the ratio: flareSize / haloSize.

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

setFlareSeed(flareseed)

source code 

Set flare's offset in the seed table.

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

setFlareBoost(flareboost)

source code 

Set the flare's extra strength.

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

setSubSize(subsize)

source code 

Set the dimension of subflare, dots and circles.

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

setHardness(hardness)

source code 

Set the hardness of the specularity.

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

setNFlares(nflares)

source code 

Set the number of halo subflares.

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

setNStars(nstars)

source code 

Set the number of points in the halo stars.

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

setNLines(nlines)

source code 

Set the number of star shaped lines on each halo.

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

setNRings(nrings)

source code 

Set the number of rings on each halo.

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

setRayMirr(nrmirr)

source code 

Set amount mirror reflection for raytrace.

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

setRayMirrDepth(nrmirr)

source code 

Set amount mirror reflection for raytrace.

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

setFresnelMirr(nrmirr)

source code 

Set power of Fresnel for mirror reflection.

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

setFresnelMirrFac(nrmirr)

source code 

Set the number of ray mirror

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

setIOR(nrmirr)

source code 

Set the angular index of refraction for raytrace.

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

setTransDepth(nrmirr)

source code 

Set amount of refractions calculated maximal.

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

setFresnelTrans(nrmirr)

source code 

Set power of Fresnel for transparency.

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

setFresnelTransFac(nrmirr)

source code 

Set blending factor for Fresnel.

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

setTexture(index, texture, texco, mapto)

source code 

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)

source code 

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

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

getTextures()

source code 

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)

source code 

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)

source code 

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)

source code 

Add a new script link to this Material.

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

__copy__()

source code 

Make a copy of this material

Returns: Material
a copy of this material

freeNodes()

source code 

Removes the node tree from this material.

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

Instance Variable Details [hide private]

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

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

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.

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