Material(ID)¶
base classes — bpy_struct
, ID
-
class
bpy.types.
Material
(ID)¶ Material data-block to define the appearance of geometric objects for rendering
-
alpha_threshold
¶ A pixel is rendered only if its alpha value is above this threshold
- Type
float in [0, 1], default 0.5
-
blend_method
¶ Blend Mode for Transparent Faces
OPAQUE
Opaque – Render surface without transparency.CLIP
Alpha Clip – Use the alpha threshold to clip the visibility (binary visibility).HASHED
Alpha Hashed – Use noise to dither the binary visibility (works well with multi-samples).BLEND
Alpha Blend – Render polygon transparent, depending on alpha channel of the texture.
- Type
enum in [‘OPAQUE’, ‘CLIP’, ‘HASHED’, ‘BLEND’], default ‘OPAQUE’
-
cycles
¶ Cycles material settings
- Type
CyclesMaterialSettings
, (readonly)
-
diffuse_color
¶ Diffuse color of the material
- Type
float array of 4 items in [0, inf], default (0.8, 0.8, 0.8, 0.8)
-
grease_pencil
¶ Grease pencil color settings for material
- Type
MaterialGPencilStyle
, (readonly)
-
is_grease_pencil
¶ True if this material has grease pencil data
- Type
boolean, default False, (readonly)
-
line_color
¶ Line color used for Freestyle line rendering
- Type
float array of 4 items in [0, inf], default (0.0, 0.0, 0.0, 0.0)
-
line_priority
¶ The line color of a higher priority is used at material boundaries
- Type
int in [0, 32767], default 0
-
lineart
¶ Line art settings for material
- Type
MaterialLineArt
, (readonly)
-
metallic
¶ Amount of mirror reflection for raytrace
- Type
float in [0, 1], default 0.0
-
paint_active_slot
¶ Index of active texture paint slot
- Type
int in [0, 32767], default 0
-
paint_clone_slot
¶ Index of clone texture paint slot
- Type
int in [0, 32767], default 0
-
pass_index
¶ Index number for the “Material Index” render pass
- Type
int in [0, 32767], default 0
-
preview_render_type
¶ Type of preview render
FLAT
Flat – Flat XY plane.SPHERE
Sphere – Sphere.CUBE
Cube – Cube.HAIR
Hair – Hair strands.SHADERBALL
Shader Ball – Shader ball.CLOTH
Cloth – Cloth.FLUID
Fluid – Fluid.
- Type
enum in [‘FLAT’, ‘SPHERE’, ‘CUBE’, ‘HAIR’, ‘SHADERBALL’, ‘CLOTH’, ‘FLUID’], default ‘SPHERE’
-
refraction_depth
¶ Approximate the thickness of the object to compute two refraction event (0 is disabled)
- Type
float in [0, inf], default 0.0
-
roughness
¶ Roughness of the material
- Type
float in [0, 1], default 0.4
-
shadow_method
¶ Shadow mapping method
NONE
None – Material will cast no shadow.OPAQUE
Opaque – Material will cast shadows without transparency.CLIP
Alpha Clip – Use the alpha threshold to clip the visibility (binary visibility).HASHED
Alpha Hashed – Use noise to dither the binary visibility and use filtering to reduce the noise.
- Type
enum in [‘NONE’, ‘OPAQUE’, ‘CLIP’, ‘HASHED’], default ‘OPAQUE’
-
show_transparent_back
¶ Limit transparency to a single layer (avoids transparency sorting problems)
- Type
boolean, default False
-
specular_color
¶ Specular color of the material
- Type
float array of 3 items in [0, inf], default (1.0, 1.0, 1.0)
-
specular_intensity
¶ How intense (bright) the specular reflection is
- Type
float in [0, 1], default 0.5
-
texture_paint_images
¶ Texture images used for texture painting
- Type
bpy_prop_collection
ofImage
, (readonly)
-
texture_paint_slots
¶ Texture slots defining the mapping and influence of textures
- Type
bpy_prop_collection
ofTexPaintSlot
, (readonly)
-
use_backface_culling
¶ Use back face culling to hide the back side of faces
- Type
boolean, default False
-
use_nodes
¶ Use shader nodes to render the material
- Type
boolean, default False
-
use_preview_world
¶ Use the current world background to light the preview render
- Type
boolean, default False
-
use_screen_refraction
¶ Use raytraced screen space refractions
- Type
boolean, default False
-
use_sss_translucency
¶ Add translucency effect to subsurface
- Type
boolean, default False
-
classmethod
bl_rna_get_subclass
(id, default=None)¶ - Parameters
id (string) – The RNA type identifier.
- Returns
The RNA type or default when not found.
- Return type
bpy.types.Struct
subclass
-
classmethod
bl_rna_get_subclass_py
(id, default=None)¶ - Parameters
id (string) – The RNA type identifier.
- Returns
The class or default when not found.
- Return type
type
-
Inherited Properties
Inherited Functions
References