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

Wrong app selection has no clear error message when importing #84

Open
Brachi opened this issue Mar 9, 2024 · 0 comments
Open

Wrong app selection has no clear error message when importing #84

Brachi opened this issue Mar 9, 2024 · 0 comments
Labels

Comments

@Brachi
Copy link
Owner

Brachi commented Mar 9, 2024

If one selects a wrong app when importing a file from another app, the error reported has no indication that the app might be incorrect.
There should be a help message asking if the user is sure that the file is coming from the selected app.
In this case, a simple check for magic_id plus the mod_version attribute should be enough.

For example, selecting RE5 and trying to import a RE1 file gives:

Error: KeyError: 're5'
Traceback:
  File "/blender/3.6/scripts/addons/albam/blender_ui/import_panel.py", line 48, in execute
    self._execute(item, context)
  File "/blender/3.6/scripts/addons/albam/blender_ui/import_panel.py", line 57, in _execute
    bl_container = import_function(item, context)
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/mesh.py", line 299, in build_blender_model
    materials = build_blender_materials(
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/material.py", line 93, in build_blender_materials
    mrl = _infer_mrl(context, mod_file_item, app_id)
  File "/blender/3.6/scripts/addons/albam/engines/mtfw/material.py", line 862, in _infer_mrl
    cb_globals_version = MRL_APPID_CB_GLOBALS_VERSION[app_id]
@Brachi Brachi added the bug label Mar 9, 2024
@Brachi Brachi changed the title Wrong app_id selection has no clear error message when importing Wrong app selection has no clear error message when importing Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant