Module Contents#

class ifcopenshell.api.style.add_surface_textures.Usecase(file, material=None, uv_maps=None, textures=None)#

Add surface texture based on a Blender material definition or texture data.

  • material (bpy.types.Material) – The Blender material definition with a node tree that is compatible with glTF. See one of the valid combinations here: https://docs.blender.org/manual/en/dev/addons/import_export/scene_gltf2.html

  • uv_maps (list[ifcopenshell.entity_instance.entity_instance]) – A list of IfcIndexedTextureMap for any IfcTessellatedFaceSets that the representation has, obtained from the HasTextures attribute.

  • textures (list[dict]) –

    A list of dictionaries containing:

    1. Attributes to create IfcImageTexture.

    2. One additional parameter uv_mode to map IfcImageTexture to correct IfcTextureCoordinate type.

    Possible uv_mode values:

    • UV - use IfcTextureCoordinate from uv_maps parameter;

    • Generated - IfcTextureCoordinateGenerator with mode COORD (autogenerated UV based on geometry);

    • Camera - IfcTextureCoordinateGenerator with mode COORD_EYE (autogenerated UV based on camera position)


A list of IfcImageTexture

Return type


apply_uv_map_to_texture(self, texture)#
create_surface_texture(self, node, mode)#
detect_diffuse_map(self, bsdf)#
detect_emissive_map(self, bsdf)#
detect_metallicroughness_map(self, bsdf)#
detect_normal_map(self, bsdf)#
detect_unlit_emissive_map(self, bsdf)#
process_texture_coordinates(self, node, texture)#