blendify.materials package

Submodules

blendify.materials.base module

class blendify.materials.base.Material[source]

Bases: ABC

abstract 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(metallic=0.0, specular=0.3, specular_tint=0.0, roughness=0.4, anisotropic=0.0, anisotropic_rotation=0.0, sheen=0.0, sheen_tint=0.5, clearcoat=0.0, clearcoat_roughness=0.0, ior=1.45, transmission=0.0, transmission_roughness=0.0, emission=(0, 0, 0, 0), emission_strength=0.0, alpha=1.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, clearcoat=0.0, specular=0.5, clearcoat_roughness=0.0, **kwargs)[source]

Bases: PrincipledBSDFMaterial

class blendify.materials.metal.MetalWireframeMaterial(roughness=0.55, metallic=0.9, clearcoat=0.0, specular=0.5, clearcoat_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, clearcoat=0.0, specular=0.5, clearcoat_roughness=0.0, **kwargs)[source]

Bases: PrincipledBSDFMaterial

class blendify.materials.plastic.PlasticWireframeMaterial(roughness=0.3, ior=1.45, clearcoat=0.0, specular=0.5, clearcoat_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