Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export: Ignore empty vertex groups #82

Closed
Brachi opened this issue Mar 6, 2024 · 0 comments · Fixed by #88
Closed

Export: Ignore empty vertex groups #82

Brachi opened this issue Mar 6, 2024 · 0 comments · Fixed by #88
Assignees
Milestone

Comments

@Brachi
Copy link
Owner

Brachi commented Mar 6, 2024

If there's a single empty vertex group, e.g., a vertex group with no weights assigned the export will fail with an obscure traceback.

Error: Python: Traceback (most recent call last):
  File "/blender/3.6/scripts/addons/albam/blender_ui/export_panel.py", line 224, in execute
    self._execute(item)
  File "/blender/3.6/scripts/addons/albam/blender_ui/export_panel.py", line 234, in _execute
    vfiles = export_function(item.bl_object)
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/mesh.py", line 733, in export_mod
    _serialize_meshes_data(bl_obj, bl_meshes, src_mod, dst_mod, materials_map, bone_palettes))
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/mesh.py", line 1164, in _serialize_meshes_data
    mesh_weight_bounds = _calculate_weight_bounds(
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/mesh.py", line 1486, in _calculate_weight_bounds
    weight_bound = _calculate_vertex_group_weight_bound(
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/mesh.py", line 1602, in _calculate_vertex_group_weight_bound
    min_x = min((v[0] for v in vertices_in_group_bone_space))
ValueError: min() arg is an empty sequence

It won´t tell you which mesh, and it will keep failing until all are fixed.

The albam_reloaded tool "Remove empty vertex groups" is almost mandatory then, providing a terrible user experience for first-time users . Empty weight groups can be safely ignored.

@Brachi Brachi self-assigned this Mar 13, 2024
@Brachi Brachi added this to the Version 0.4 milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant