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

Deleted imported models are kept in the Exportable list #130

Open
Brachi opened this issue Sep 8, 2024 · 0 comments
Open

Deleted imported models are kept in the Exportable list #130

Brachi opened this issue Sep 8, 2024 · 0 comments
Labels

Comments

@Brachi
Copy link
Owner

Brachi commented Sep 8, 2024

  1. Import a model, e.g. pl0000.mod
  2. Verify pl0000.mod appears in the exportable list
  3. Delete the imported object and all its children
  4. pl0000.mod remains in the exportable list, but when clicking export, the following error appears
==================
Albam error report
==================

Blender version: 4.2.1
Albam version: 0.4.0.dev11
Operating System: Linux-6.10.7-arch1-1-x86_64-with-glibc2.40
Error: ValueError: max() iterable argument is empty
Traceback:
  File "******/.config/blender/4.2/scripts/addons/albam/blender_ui/export_panel.py", line 167, in execute
    self._execute(context, item)
  File "******/.config/blender/4.2/scripts/addons/albam/blender_ui/export_panel.py", line 179, in _execute
    vfiles = export_function(item.bl_object)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "******/.config/blender/4.2/scripts/addons/albam/engines/mtfw/texture.py", line 783, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "******/.config/blender/4.2/scripts/addons/albam/engines/mtfw/material.py", line 999, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "******/.config/blender/4.2/scripts/addons/albam/engines/mtfw/mesh.py", line 763, in export_mod
    _serialize_top_level_mod(bl_meshes, src_mod, dst_mod)
  File "******/.config/blender/4.2/scripts/addons/albam/engines/mtfw/mesh.py", line 858, in _serialize_top_level_mod
    sphere = get_model_bounding_sphere(bl_meshes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "******/.config/blender/4.2/scripts/addons/albam/lib/blender.py", line 159, in get_model_bounding_sphere
    radius = max(map(lambda vertex: get_dist(center, vertex), vertices))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

=================
@Brachi Brachi added the bug label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant