Skip to content

glTF extension: "Bad slot" error check is broken due to material library #704

@Dragorn421

Description

@Dragorn421

When enabling the "Bad slot" error check:

Image

glTF export always fail with the following:

03:29:29 | INFO: Extracting primitive: fast64_f3d_material_library_PlaneMesh
03:29:29 | INFO: Primitives created: 1
F3DExtensions.gather_mesh_hook:
Traceback (most recent call last):
  File "/home/dragorn421/.config/blender/3.2/scripts/addons/fast64_gitlinked/fast64_internal/gltf_extension.py", line 68, in call_hooks
    getattr(extension, hook)(*args)
  File "/home/dragorn421/.config/blender/3.2/scripts/addons/fast64_gitlinked/fast64_internal/f3d/glTF/f3d_gltf.py", line 637, in gather_mesh_hook
    check_face_materials(
  File "/home/dragorn421/.config/blender/3.2/scripts/addons/fast64_gitlinked/fast64_internal/f3d/f3d_writer.py", line 119, in check_face_materials
    raise PluginError(
fast64_gitlinked.fast64_internal.utility.PluginError: Mesh object fast64_f3d_material_library_PlaneMesh has faces assigned to a material slot which isn't set to any material. Set a material for the slot or assign the faces to an actual material. (0-indexed: slot 0, aka the 1th slot).

(this error is on Blender 3.2.2. The same happens on 5.1.0)

This is weird for two separate reasons

  1. why is glTF even exporting the f3d material library... but nothing we can do about that really

  2. the fast64_f3d_material_library_PlaneMesh mesh in the material library, does have a material for slot 0 so I'm not sure why it's erroring at all

Workaround

Disable the "Bad slot" error check (it is disabled by default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions