This object gives access to Materials in Blender.
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. |
|
|
|
|
|
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. |
|
|
|
|
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. |
|
|
|
|
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. |
|
|
|
|
float
|
getFresnelMirr()
Get power of Fresnel for mirror reflection. |
|
|
|
|
float
|
getFresnelMirrFac()
Get 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. |
|
|
|
|
float
|
getFresnelTransFac()
Get 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
|
|
list
|
getScriptLinks(event)
Get a list with this Material's script links of type 'event'. |
|
|
|
|
|
addScriptLink(text,
event)
Add a new script link to this Material. |
|
|
Material
|
|
bool
|
freeNodes()
Removes the node tree from this material. |
|
|
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).
|