Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/api2_2x/doc/Material.py')
-rw-r--r--source/blender/python/api2_2x/doc/Material.py83
1 files changed, 79 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/doc/Material.py b/source/blender/python/api2_2x/doc/Material.py
index a3496164cd1..b37fd660810 100644
--- a/source/blender/python/api2_2x/doc/Material.py
+++ b/source/blender/python/api2_2x/doc/Material.py
@@ -80,6 +80,35 @@ Example::
- SPEC_BLINN - Make Material use the Blinn specular shader.
- SPEC_TOON - Make Material use the toon specular shader.
- SPEC_WARDISO - Make Material use the Ward-iso specular shader.
+
+@type ColorbandMethod: readonly dictionary
+@var ColorbandMethod: The available Colorband mixing methods.
+ - ADD - Make Material use the Add method.
+ - BLEND - Make Material use the Blend/Mix method.
+ - BURN - Make Material use the Burn method.
+ - COLOR - Make Material use the Color method.
+ - DARK - Make Material use the Darken method.
+ - DIFF - Make Material use the Difference method.
+ - DIV - Make Material use the Divide method.
+ - DODGE - Make Material use the Dodge method.
+ - HUE - Make Material use the Hue method.
+ - LIGHT - Make Material use the Lighten method.
+ - MIX - Make Material use the Blend/Mix method.
+ - MULT - Make Material use the Multiply method.
+ - OVERLAY - Make Material use the Overlay method.
+ - SAT - Make Material use the Saturation method.
+ - SCREEN - Make Material use the Screen method.
+ - SUB - Make Material use the Substract method.
+ - VAL - Make Material use the Value method.
+
+@type ColorbandInput: readonly dictionary
+@var ColorbandInput: The available Colorband Input sources.
+ - ENERGY - Make Material use the Energy input.
+ - NORMAL - Make Material use the Normal input.
+ - RESULT - Make Material use the Result input.
+ - SHADER - Make Material use the Shader input.
+
+
"""
def New (name = 'Mat'):
@@ -183,7 +212,7 @@ class Material:
Value is clamped to the range [0.0,100.0].
@type haloSize: float
@ivar hard: Hardness of the specularity.
- Value is clamped to the range [1,255].
+ Value is clamped to the range [1,511].
@type hard: int
@ivar ipo: Material Ipo data.
Contains the Ipo if one is assigned to the object, None otherwise. Setting to None clears the current Ipo.
@@ -323,7 +352,46 @@ class Material:
each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
The colorband can have between 1 and 31 colors.
@type colorbandSpecular: list
-
+ @ivar colorbandDiffuseInput: Material Diffuse colorband input.
+ The integer result must be compared with L{ColorbandInput}
+ dictionary.
+ @type colorbandDiffuseInput: int
+ @ivar colorbandDiffuseMethod: Material Diffuse colorband method.
+ The integer result must be compared with L{ColorbandMethod}
+ dictionary.
+ @type colorbandDiffuseMethod: int
+ @ivar colorbandDiffuseFactor: Material Diffuse colorband factor.
+ Value is clamped to the range [0.0,1.0].
+ @type colorbandDiffuseFactor: float
+ @ivar colorbandSpecularInput: Material Specular colorband input.
+ The integer result must be compared with L{ColorbandInput}
+ dictionary.
+ @type colorbandSpecularInput: int
+ @ivar colorbandSpecularMethod: Material Specular colorband method.
+ The integer result must be compared with L{ColorbandMethod}
+ dictionary.
+ @type colorbandSpecularMethod: int
+ @ivar colorbandSpecularFactor: Material Specular colorband factor.
+ Value is clamped to the range [0.0,1.0].
+ @type colorbandSpecularFactor: float
+ @type enabledTextures: list of integers
+ @ivar 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
+ L{getTextures()<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 textures: a tuple of Blender MTex objects.
+ @ivar textures: the Material's Texture list. Empty texture channels contains None.
@ivar enableSSS: If True, subsurface scattering will be rendered on this material.
@type enableSSS: bool
@ivar sssScale: If True, subsurface scattering will be rendered on this material.
@@ -1010,7 +1078,7 @@ class Material:
def setTexture(index, texture, texco, mapto):
"""
- Assign a Blender Texture object to slot number 'number'.
+ Assign a Blender Texture object to channel number 'number'.
@type index: int
@param index: material's texture index in [0, 9].
@type texture: Blender Texture
@@ -1033,7 +1101,7 @@ class Material:
Get this Material's Texture list.
@rtype: list of MTex
@return: a list of Blender MTex objects. None is returned for each empty
- texture slot.
+ texture channel.
"""
def getScriptLinks (event):
@@ -1070,5 +1138,12 @@ class Material:
@return: a copy of this material
"""
+ def freeNodes ():
+ """
+ Removes the node tree from this material.
+ @rtype: bool
+ @return: true if nodes were freed from this material.
+ """
+
import id_generics
Material.__doc__ += id_generics.attributes