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

[BUG] Scenes with 4 LODs fail to get imported #94

Open
lyravega opened this issue Nov 29, 2022 · 1 comment
Open

[BUG] Scenes with 4 LODs fail to get imported #94

lyravega opened this issue Nov 29, 2022 · 1 comment
Assignees
Labels

Comments

@lyravega
Copy link

Describe the bug
Import failure on scenes with 4 LODs instead of the usual 3

To Reproduce
Try importing a scene such as MODELS\COMMON\SPACECRAFT\COMMONPARTS\HANGARINTERIORPARTS\HANGAR.SCENE.MBIN

Stack trace

E:\_modding\NMS\AMUMSS\_unpack\main\MODELS\COMMON\SPACECRAFT\COMMONPARTS\HANGARINTERIORPARTS\HANGAR.SCENE.MBIN
Loading MODELS\COMMON\SPACECRAFT\COMMONPARTS\HANGARINTERIORPARTS\HANGAR
rendering MODELS\COMMON\SPACECRAFT\COMMONPARTS\HANGARINTERIORPARTS\HANGAR
removing Cube
Traceback (most recent call last):
  File "C:\Users\alpha\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nmsdk\NMSDK.py", line 931, in execute
    importer.render_scene()
  File "C:\Users\alpha\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nmsdk\ModelImporter\import_scene.py", line 338, in render_scene
    added_obj = self._add_empty_to_scene(self.scene_node_data)
  File "C:\Users\alpha\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\nmsdk\ModelImporter\import_scene.py", line 569, in _add_empty_to_scene
    empty_obj.NMSReference_props.lod_levels = lods
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 3 items, not 4

Additional context
Manually obliterated one of the LOD levels from the model, and changed the length to 3 to open the scene for now

@lyravega lyravega added the bug label Nov 29, 2022
@lyravega lyravega changed the title [BUG] Scenes with 4 LODs fail to load [BUG] Scenes with 4 LODs fail to get imported Nov 29, 2022
@lyravega
Copy link
Author

lyravega commented Nov 29, 2022

Tried importing it again, this time, it worked... no idea what's going on.

@monkeyman192 monkeyman192 self-assigned this Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants