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 (in [0, 1], default 0.5)
- Type:
float
- blend_method¶
Blend Mode for Transparent Faces (Deprecated: use ‘surface_render_method’) (default
'OPAQUE')OPAQUEOpaque – Render surface without transparency.CLIPAlpha Clip – Use the alpha threshold to clip the visibility (binary visibility).HASHEDAlpha Hashed – Use noise to dither the binary visibility (works well with multi-samples).BLENDAlpha Blend – Render polygon transparent, depending on alpha channel of the texture.
- Type:
Literal[‘OPAQUE’, ‘CLIP’, ‘HASHED’, ‘BLEND’]
- cycles¶
Cycles material settings (readonly)
- Type:
CyclesMaterialSettings
- diffuse_color¶
Diffuse color of the material (array of 4 items, in [0, inf], default (0.8, 0.8, 0.8, 1.0))
- Type:
bpy_prop_array[float]
- displacement_method¶
Method to use for the displacement (default
'BUMP')BUMPBump Only – Bump mapping to simulate the appearance of displacement.DISPLACEMENTDisplacement Only – Use true displacement of surface only, requires fine subdivision.BOTHDisplacement and Bump – Combination of true displacement and bump mapping for finer detail.
- Type:
Literal[‘BUMP’, ‘DISPLACEMENT’, ‘BOTH’]
- grease_pencil¶
Grease Pencil color settings for material (readonly)
- Type:
- is_grease_pencil¶
True if this material has Grease Pencil data (default False, readonly)
- Type:
bool
- line_color¶
Line color used for Freestyle line rendering (array of 4 items, in [0, inf], default (0.0, 0.0, 0.0, 0.0))
- Type:
bpy_prop_array[float]
- line_priority¶
The line color of a higher priority is used at material boundaries (in [0, 32767], default 0)
- Type:
int
- lineart¶
Line Art settings for material (readonly)
- Type:
- max_vertex_displacement¶
The max distance a vertex can be displaced. Displacements over this threshold may cause visibility issues. (in [0, inf], default 0.0)
- Type:
float
- metallic¶
Amount of mirror reflection for raytrace (in [0, 1], default 0.0)
- Type:
float
- paint_active_slot¶
Index of active texture paint slot (in [0, 32767], default 0)
- Type:
int
- paint_clone_slot¶
Index of clone texture paint slot (in [0, 32767], default 0)
- Type:
int
- pass_index¶
Index number for the “Material Index” render pass (in [0, 32767], default 0)
- Type:
int
- preview_render_type¶
Type of preview render (default
'SPHERE')FLATFlat – Flat XY plane.SPHERESphere – Sphere.CUBECube – Cube.HAIRHair – Hair strands.SHADERBALLShader Ball – Shader ball.CLOTHCloth – Cloth.FLUIDFluid – Fluid.
- Type:
Literal[‘FLAT’, ‘SPHERE’, ‘CUBE’, ‘HAIR’, ‘SHADERBALL’, ‘CLOTH’, ‘FLUID’]
- refraction_depth¶
Approximate the thickness of the object to compute two refraction events (0 is disabled) (Deprecated) (in [0, inf], default 0.0)
- Type:
float
- roughness¶
Roughness of the material (in [0, 1], default 0.4)
- Type:
float
- show_transparent_back¶
Render multiple transparent layers (may introduce transparency sorting problems) (Deprecated: use ‘use_tranparency_overlap’) (default True)
- Type:
bool
- specular_color¶
Specular color of the material (array of 3 items, in [0, inf], default (1.0, 1.0, 1.0))
- Type:
- specular_intensity¶
How intense (bright) the specular reflection is (in [0, 1], default 0.5)
- Type:
float
- surface_render_method¶
Controls the blending and the compatibility with certain features (default
'DITHERED')DITHEREDDithered – Allows for grayscale hashed transparency, and compatible with render passes and raytracing. Also known as deferred rendering..BLENDEDBlended – Allows for colored transparency, but incompatible with render passes and raytracing. Also known as forward rendering..
- Type:
Literal[‘DITHERED’, ‘BLENDED’]
- texture_paint_images¶
Texture images used for texture painting (default None, readonly)
- Type:
- texture_paint_slots¶
Texture slots defining the mapping and influence of textures (default None, readonly)
- Type:
- thickness_mode¶
Approximation used to model the light interactions inside the object (default
'SPHERE')SPHERESphere – Approximate the object as a sphere whose diameter is equal to the thickness defined by the node tree.SLABSlab – Approximate the object as an infinite slab of thickness defined by the node tree.
- Type:
Literal[‘SPHERE’, ‘SLAB’]
- use_backface_culling¶
Use back face culling to hide the back side of faces (default False)
- Type:
bool
- use_backface_culling_lightprobe_volume¶
Consider material single sided for light probe volume capture. Additionally helps rejecting probes inside the object to avoid light leaks. (default True)
- Type:
bool
- use_backface_culling_shadow¶
Use back face culling when casting shadows (default False)
- Type:
bool
- use_nodes¶
Use shader nodes to render the material (default False)
Deprecated since version 5.0: removal planned in version 6.0
Unused but kept for compatibility reasons. Setting the property has no effect, and getting it always returns True.
- Type:
bool
- use_preview_world¶
Use the current world background to light the preview render (default False)
- Type:
bool
- use_raytrace_refraction¶
Use raytracing to determine transmitted color instead of using only light probes. This prevents the surface from contributing to the lighting of surfaces not using this setting. (default False)
- Type:
bool
- use_screen_refraction¶
Use raytracing to determine transmitted color instead of using only light probes. This prevents the surface from contributing to the lighting of surfaces not using this setting. Deprecated: use ‘use_raytrace_refraction’. (default False)
- Type:
bool
- use_sss_translucency¶
Add translucency effect to subsurface (Deprecated) (default False)
- Type:
bool
- use_thickness_from_shadow¶
Use the shadow maps from shadow casting lights to refine the thickness defined by the material node tree (default False)
- Type:
bool
- use_transparency_overlap¶
Render multiple transparent layers (may introduce transparency sorting problems) (default True)
- Type:
bool
- use_transparent_shadow¶
Use transparent shadows for this material if it contains a Transparent BSDF, disabling will render faster but not give accurate shadows (default True)
- Type:
bool
- volume_intersection_method¶
Determines which inner part of the mesh will produce volumetric effect (default
'FAST')FASTFast – Each face is considered as a medium interface. Gives correct results for manifold geometry that contains no inner parts..ACCURATEAccurate – Faces are considered as medium interface only when they have different consecutive facing. Gives correct results as long as the max ray depth is not exceeded. Have significant memory overhead compared to the fast method..
- Type:
Literal[‘FAST’, ‘ACCURATE’]
- inline_shader_nodes()¶
Get the inlined shader nodes of this material. This preprocesses the node tree to remove nested groups, repeat zones and more.
- Returns:
The inlined shader nodes.
- Return type:
bpy.types.InlineShaderNodes
- classmethod bl_rna_get_subclass(id, default=None, /)¶
- Parameters:
id (str) – The RNA type identifier.
default (
bpy.types.Struct| None) – The value to return when not found.
- Returns:
The RNA type or default when not found.
- Return type:
- classmethod bl_rna_get_subclass_py(id, default=None, /)¶
- Parameters:
id (str) – The RNA type identifier.
default (type | None) – The value to return when not found.
- Returns:
The class or default when not found.
- Return type:
type
Inherited Properties¶
Inherited Functions¶
References¶
|