Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fast64_internal/gltf_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ def gather_mesh_hook(self, gltf2_mesh, blender_mesh, blender_object, vertex_grou
)

def gather_material_hook(self, gltf2_material, blender_material, export_settings):
if bpy.app.version == (5, 2, 0) and not isinstance(blender_material, bpy.types.Material):
# work around bug in the gltf addon shipped with Blender 5.2.0
# https://github.com/KhronosGroup/glTF-Blender-IO/issues/2732
blender_material = bpy.data.materials[gltf2_material.name]
self.call_hooks(
"gather_material_hook",
'Material "{args[1].name}"',
Expand Down