80
80
- SPEC_BLINN - Make Material use the Blinn specular shader.
81
81
- SPEC_TOON - Make Material use the toon specular shader.
82
82
- SPEC_WARDISO - Make Material use the Ward-iso specular shader.
84
@type ColorbandMethod: readonly dictionary
85
@var ColorbandMethod: The available Colorband mixing methods.
86
- ADD - Make Material use the Add method.
87
- BLEND - Make Material use the Blend/Mix method.
88
- BURN - Make Material use the Burn method.
89
- COLOR - Make Material use the Color method.
90
- DARK - Make Material use the Darken method.
91
- DIFF - Make Material use the Difference method.
92
- DIV - Make Material use the Divide method.
93
- DODGE - Make Material use the Dodge method.
94
- HUE - Make Material use the Hue method.
95
- LIGHT - Make Material use the Lighten method.
96
- MIX - Make Material use the Blend/Mix method.
97
- MULT - Make Material use the Multiply method.
98
- OVERLAY - Make Material use the Overlay method.
99
- SAT - Make Material use the Saturation method.
100
- SCREEN - Make Material use the Screen method.
101
- SUB - Make Material use the Substract method.
102
- VAL - Make Material use the Value method.
104
@type ColorbandInput: readonly dictionary
105
@var ColorbandInput: The available Colorband Input sources.
106
- ENERGY - Make Material use the Energy input.
107
- NORMAL - Make Material use the Normal input.
108
- RESULT - Make Material use the Result input.
109
- SHADER - Make Material use the Shader input.
85
114
def New (name = 'Mat'):
183
212
Value is clamped to the range [0.0,100.0].
184
213
@type haloSize: float
185
214
@ivar hard: Hardness of the specularity.
186
Value is clamped to the range [1,255].
215
Value is clamped to the range [1,511].
188
217
@ivar ipo: Material Ipo data.
189
218
Contains the Ipo if one is assigned to the object, None otherwise. Setting to None clears the current Ipo.
323
352
each color a list of 5 floats [0 - 1], [r,g,b,a,pos].
324
353
The colorband can have between 1 and 31 colors.
325
354
@type colorbandSpecular: list
355
@ivar colorbandDiffuseInput: Material Diffuse colorband input.
356
The integer result must be compared with L{ColorbandInput}
358
@type colorbandDiffuseInput: int
359
@ivar colorbandDiffuseMethod: Material Diffuse colorband method.
360
The integer result must be compared with L{ColorbandMethod}
362
@type colorbandDiffuseMethod: int
363
@ivar colorbandDiffuseFactor: Material Diffuse colorband factor.
364
Value is clamped to the range [0.0,1.0].
365
@type colorbandDiffuseFactor: float
366
@ivar colorbandSpecularInput: Material Specular colorband input.
367
The integer result must be compared with L{ColorbandInput}
369
@type colorbandSpecularInput: int
370
@ivar colorbandSpecularMethod: Material Specular colorband method.
371
The integer result must be compared with L{ColorbandMethod}
373
@type colorbandSpecularMethod: int
374
@ivar colorbandSpecularFactor: Material Specular colorband factor.
375
Value is clamped to the range [0.0,1.0].
376
@type colorbandSpecularFactor: float
377
@type enabledTextures: list of integers
378
@ivar enabledTextures: The texture channels enabled in this material.
379
The attribute returns is list of integers in the range [0, 9], each
380
number representing the respective enabled MTex entry (see
381
L{getTextures()<getTextures>}). Enabling is done by assigning
382
a list of ints or an empty list. Attempting to enable a channel
383
which does not have a texture assigned to it will result in a
384
ValueError exception.
386
mat.enabledTextures = [] # no texture channels are enabled
387
mat.enabledTextures = [0, 6] # texture channels 0 and 6 are enabled
388
ch = mat.enabledTextures
390
mat.enabledTextures = ch
391
print mat.enabledTextures # will print: [0, 4, 6]
393
@type textures: a tuple of Blender MTex objects.
394
@ivar textures: the Material's Texture list. Empty texture channels contains None.
327
395
@ivar enableSSS: If True, subsurface scattering will be rendered on this material.
328
396
@type enableSSS: bool
329
397
@ivar sssScale: If True, subsurface scattering will be rendered on this material.
1011
1079
def setTexture(index, texture, texco, mapto):
1013
Assign a Blender Texture object to slot number 'number'.
1081
Assign a Blender Texture object to channel number 'number'.
1014
1082
@type index: int
1015
1083
@param index: material's texture index in [0, 9].
1016
1084
@type texture: Blender Texture