blendify.materials package

Submodules

blendify.materials.base module

class blendify.materials.base.Material[source]

Bases: ABC

abstractmethod create_material(name: str = 'object_material') MaterialInstance[source]
class blendify.materials.base.MaterialInstance(blender_material: bpy.types.Material, inputs: Dict[str, bpy_types.NodeSocket], colors_node: bpy_types.ShaderNode | None = None)[source]

Bases: object

blender_material: Material
colors_node: ShaderNode | None = None
inputs: Dict[str, NodeSocket]
blendify.materials.base.material_property(name: str)[source]

Creates a property for the material class to get one of the material parameters

Parameters:

name (str) – property name

Returns:

A class property with defines parameter setting and getting behaviour

Return type:

property

blendify.materials.bsdf module

class blendify.materials.bsdf.GlossyBSDFMaterial(roughness=0.4, distribution='GGX')[source]

Bases: Material

A class which manages the parameters of GlossyBSDF Blender material. Full docs: https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/glossy.html

create_material(name: str = 'object_material') MaterialInstance[source]

Create the Blender material with the parameters stored in the current object

Parameters:

name (str) – a unique material name for Blender

Returns:

Blender material and the

shader node which uses the created material

Return type:

Tuple[bpy.types.Material, bpy.types.ShaderNodeBsdfGlossy]

property distribution
class blendify.materials.bsdf.PrincipledBSDFMaterial(alpha=1.0, anisotropic=0.0, anisotropic_rotation=0.0, coat_ior=0.0, coat_roughness=0.0, coat_tint=(1.0, 1.0, 1.0, 1.0), coat_weight=0.0, diffuse_roughness=0.0, emission_color=(0, 0, 0, 0), emission_strength=0.0, ior=1.45, metallic=0.0, roughness=0.4, sheen_weight=0.0, sheen_roughness=0.5, sheen_tint=(0.5, 0.5, 0.5, 1.0), specular_ior=0.3, specular_tint=(0.0, 0.0, 0.0, 1.0), subsurface_anisotropy=0.0, subsurface_radius=(1.0, 0.2, 1.0), subsurface_scale=0.05, subsurface_weight=0.0, thin_film_ior=1.33, thin_film_thickness=0.0, transmission_weight=0.0)[source]

Bases: Material

A class which manages the parameters of PrincipledBSDF Blender material. Full docs: https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/principled.html

create_material(name: str = 'object_material') MaterialInstance[source]

Create the Blender material with the parameters stored in the current object

Parameters:

name (str) – a unique material name for Blender

Returns:

Blender material and the

shader node which uses the created material

Return type:

Tuple[bpy.types.Material, bpy.types.ShaderNodeBsdfPrincipled]

class blendify.materials.bsdf.PrincipledBSDFWireframeMaterial(wireframe_thickness=0.01, wireframe_color=(0.0, 0.0, 0.0, 1.0), **kwargs)[source]

Bases: WireframeMaterial, PrincipledBSDFMaterial

create_material(name: str = 'object_material') MaterialInstance[source]

Create the Blender material with the parameters stored in the current object

Parameters:

name (str) – a unique material name for Blender

Returns:

Blender material and the

shader node which uses the created material

Return type:

Tuple[bpy.types.Material, bpy.types.ShaderNodeBsdfPrincipled]

blendify.materials.metal module

class blendify.materials.metal.MetalMaterial(roughness=0.55, metallic=0.9, coat_ior=0.0, specular_ior=0.5, coat_roughness=0.0, **kwargs)[source]

Bases: PrincipledBSDFMaterial

class blendify.materials.metal.MetalWireframeMaterial(roughness=0.55, metallic=0.9, coat_ior=0.0, specular_ior=0.5, coat_roughness=0.0, wireframe_thickness=0.01, wireframe_color=(0.0, 0.0, 0.0, 1.0), **kwargs)[source]

Bases: PrincipledBSDFWireframeMaterial

blendify.materials.plastic module

class blendify.materials.plastic.PlasticMaterial(roughness=0.3, ior=1.45, coat_ior=0.0, specular_ior=0.5, coat_roughness=0.0, **kwargs)[source]

Bases: PrincipledBSDFMaterial

class blendify.materials.plastic.PlasticWireframeMaterial(roughness=0.3, ior=1.45, coat_ior=0.0, specular_ior=0.5, coat_roughness=0.0, wireframe_thickness=0.01, wireframe_color=(0.0, 0.0, 0.0, 1.0), **kwargs)[source]

Bases: PrincipledBSDFWireframeMaterial

blendify.materials.wireframe module

class blendify.materials.wireframe.WireframeMaterial(wireframe_thickness=0.01, wireframe_color=(0.0, 0.0, 0.0, 1.0), **kwargs)[source]

Bases: Material

overlay_wireframe(object_material, base_material_node)[source]

Module contents