INNER CODE UNIT · Python
is_diffuse_tex_type
skarndev/umodel_tools · umodel_tools/game_profiles/__init__.py:43
def is_diffuse_tex_type(tex_type: str, tex_short_name: str) -> bool:
"""Identifies if the texture is a diffuse color map.
Used for special logic.
:param tex_type: Texture type string retrieved from .props.txt.
:param tex_short_name: Basename of the texture file without extension.
:return: True if texture is a diffuse map, else False.
"""
def handle_material_texture_pbr(mat: bpy.types.Material,
tex_type: str,
tex_short_name: str,
img_node: bpy.types.ShaderNodeTexImage,
ao_mix_node: bpy.types.ShaderNodeMix,
bsdf_node: bpy.types.ShaderNodeBsdfPrincipled,
out_node: bpy.types.ShaderNodeOutputMaterial) -> None:
"""Handles adding texture maps to a PBR material.