Package bpy :: Module types :: Class Material
[hide private]
[frames] | no frames]

Class Material


The Material Object

Material datablock to defined the appearance of geometric objects for rendering.

References

Nested Classes [hide private]
  MaterialHalo
Halo particle effect settings for a Material datablock.
  MaterialPhysics
Physics settings for a Material datablock.
  MaterialRaytraceMirror
Raytraced reflection settings for a Material datablock.
  MaterialRaytraceTransparency
Raytraced refraction settings for a Material datablock.
  MaterialStrand
Strand settings for a Material datablock.
  MaterialSubsurfaceScattering
Diffuse subsurface scattering settings for a Material datablock.
  MaterialVolume
Volume rendering settings for a Material datablock.
Instance Methods [hide private]
 
add_texture(texture, texture_coordinates, map_to)
Add a texture to material's free texture slot.
 
animation_data_clear()
Clear animation on this this ID. (Inherited from bpy.types.ID)
AnimData
animation_data_create()
Create animation data to this ID, note that not all ID types support this. (Inherited from bpy.types.ID)
ID
copy()
Create a copy of this datablock (not supported for all datablocks). (Inherited from bpy.types.ID)
Instance Variables [hide private]
Material active_node_material
Active node material.
Texture active_texture
Active texture slot being displayed.
int in [0, 17] active_texture_index
Index of active texture slot.
float in [0, 1] alpha
Alpha transparency of the material.
float in [0, 1] ambient
Amount of global ambient color the material receives.
AnimData (readonly) animation_data
Animation data for this datablock.
boolean cast_buffer_shadows
Allow this material to cast shadows from shadow buffer lamps
boolean cast_shadows_only
Makes objects with this material appear invisible, only casting shadows (not rendered).
boolean cubic
Use cubic interpolation for diffuse values, for smoother transitions.
float in [0, 2] darkness
Minnaert darkness.
float array of 3 items in [-inf, inf] diffuse_color
Diffuse Color
float in [0, 5] diffuse_fresnel
Power of Fresnel.
float in [0, 5] diffuse_fresnel_factor
Blending factor of Frensel.
float in [0, 1] diffuse_intensity
Amount of diffuse reflection.
ColorRamp (readonly) diffuse_ramp
Color ramp used to affect diffuse shading.
enum diffuse_ramp_blend
Diffuse Ramp Blend in...
float in [0, 1] diffuse_ramp_factor
Blending factor (also uses alpha in Colorband).
enum diffuse_ramp_input
Diffuse Ramp Input in...
enum diffuse_shader
Diffuse Shader Model in...
float in [0, 3.14] diffuse_toon_size
Size of diffuse toon area.
float in [0, 1] diffuse_toon_smooth
Smoothness of diffuse toon area.
float in [0, inf] emit
Amount of light to emit.
boolean exclude_mist
Excludes this material from mist effects (in world settings)
boolean face_texture
Replaces the object's base color with color from face assigned image textures
boolean face_texture_alpha
Replaces the object's base alpha value with alpha from face assigned image textures
boolean fake_user
Saves this datablock even if it has no users (Inherited from bpy.types.ID)
boolean full_oversampling
Force this material to render full shading/textures for all anti-aliasing samples
MaterialHalo (readonly) halo
Halo settings for the material.
boolean invert_z
Renders material's faces with an inverted Z buffer (scanline only).
Library (readonly) library
Library file the datablock is linked from. (Inherited from bpy.types.ID)
Group light_group
Limit lighting to lamps in this Group.
boolean light_group_exclusive
Material uses the light group exclusively - these lamps are excluded from other scene lighting.
float array of 3 items in [-inf, inf] mirror_color
Mirror color of the material.
string name
Unique datablock ID name. (Inherited from bpy.types.ID)
NodeTree (readonly) node_tree
Node tree for node based materials.
boolean object_color
Modulate the result with a per-object color.
boolean only_shadow
Renders shadows as the material's alpha value, making materials transparent except for shadowed areas.
MaterialPhysics (readonly) physics
Game physics settings.
boolean ray_shadow_bias
Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)
MaterialRaytraceMirror (readonly) raytrace_mirror
Raytraced reflection settings for the material.
MaterialRaytraceTransparency (readonly) raytrace_transparency
Raytraced reflection settings for the material.
boolean receive_transparent_shadows
Allow this object to receive transparent shadows casted through other objects
float in [0, 3.14] roughness
Oren-Nayar Roughness
boolean shadeless
Makes this material insensitive to light or shadow.
float in [0, 10] shadow_buffer_bias
Factor to multiply shadow buffer bias with (0 is ignore.)
float in [0.001, 1] shadow_casting_alpha
Shadow casting alpha, in use for Irregular and Deep shadow buffer.
float in [0, 0.25] shadow_ray_bias
Shadow raytracing bias to prevent terminator problems on shadow boundary.
boolean shadows
Allows this material to receive shadows.
boolean sky
Renders this material with zero alpha, with sky background in place (scanline only).
float in [0, 1] specular_alpha
Alpha transparency for specular areas.
float array of 3 items in [-inf, inf] specular_color
Specular color of the material.
int in [1, 511] specular_hardness
Specular Hardness
float in [0, 1] specular_intensity
Specular Intensity
float in [1, 10] specular_ior
Specular IOR
ColorRamp (readonly) specular_ramp
Color ramp used to affect specular shading.
enum specular_ramp_blend
Diffuse Ramp Blend in...
float in [0, 1] specular_ramp_factor
Blending factor (also uses alpha in Colorband).
enum specular_ramp_input
Specular Ramp Input in...
enum specular_shader
Specular Shader Model in...
float in [0, 0.4] specular_slope
The standard deviation of surface slope.
float in [0, 1.53] specular_toon_size
Size of specular toon area.
float in [0, 1] specular_toon_smooth
Ssmoothness of specular toon area.
MaterialStrand (readonly) strand
Strand settings for the material.
MaterialSubsurfaceScattering (readonly) subsurface_scattering
Subsurface scattering settings for the material.
boolean tag
Tools can use this to tag data, (initial state is undefined). (Inherited from bpy.types.ID)
boolean tangent_shading
Use the material's tangent vector instead of the normal for shading - for anisotropic shading effects
Collection of MaterialTextureSlot (readonly) textures
Texture slots defining the mapping and influence of textures.
boolean traceable
Include this material and geometry that uses it in ray tracing calculations.
float in [0, 1] translucency
Amount of diffuse shading on the back side.
boolean transparency
Render material as transparent.
enum transparency_method
Method to use for rendering transparency.
enum type
Material type defining how the object is rendered.
boolean use_diffuse_ramp
Toggle diffuse ramp operations.
boolean use_nodes
Use shader nodes to render the material.
boolean use_specular_ramp
Toggle specular ramp operations.
boolean array of 18 items use_textures
Enable/Disable each texture.
int (readonly) in [0, 32767] users
Number of times this datablock is referenced. (Inherited from bpy.types.ID)
boolean vertex_color_light
Add vertex colors as additional lighting.
boolean vertex_color_paint
Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures).
MaterialVolume (readonly) volume
Volume settings for the material.
float in [-inf, inf] z_offset
Gives faces an artificial offset in the Z buffer for Z transparency.
Method Details [hide private]

add_texture(texture, texture_coordinates, map_to)

 

Add a texture to material's free texture slot.

Parameters:
  • texture_coordinates (enum)
  • map_to (enum)
  • texture (Texture)

Instance Variable Details [hide private]

diffuse_ramp_blend

Diffuse Ramp Blend in...
  • MIX
  • ADD
  • MULTIPLY
  • SUBTRACT
  • SCREEN
  • DIVIDE
  • DIFFERENCE
  • DARKEN
  • LIGHTEN
  • OVERLAY
  • DODGE
  • BURN
  • HUE
  • SATURATION
  • VALUE
  • COLOR
  • SOFT LIGHT
  • LINEAR LIGHT
Type:
enum

diffuse_ramp_input

Diffuse Ramp Input in...
  • SHADER
  • ENERGY
  • NORMAL
  • RESULT
Type:
enum

diffuse_shader

Diffuse Shader Model in...
  • LAMBERT
  • OREN_NAYAR
  • TOON
  • MINNAERT
  • FRESNEL
Type:
enum

specular_ramp_blend

Diffuse Ramp Blend in...
  • MIX
  • ADD
  • MULTIPLY
  • SUBTRACT
  • SCREEN
  • DIVIDE
  • DIFFERENCE
  • DARKEN
  • LIGHTEN
  • OVERLAY
  • DODGE
  • BURN
  • HUE
  • SATURATION
  • VALUE
  • COLOR
  • SOFT LIGHT
  • LINEAR LIGHT
Type:
enum

specular_ramp_input

Specular Ramp Input in...
  • SHADER
  • ENERGY
  • NORMAL
  • RESULT
Type:
enum

specular_shader

Specular Shader Model in...
  • COOKTORR
  • PHONG
  • BLINN
  • TOON
  • WARDISO
Type:
enum

transparency_method

Method to use for rendering transparency. in...
  • Z_TRANSPARENCY
  • RAYTRACE
Type:
enum

type

Material type defining how the object is rendered. in...
  • SURFACE
  • WIRE
  • VOLUME
  • HALO
Type:
enum