REDxEYE / SourceIO

SourceIO is an Blender(3.4+) addon for importing source engine textures/models/maps
https://discord.gg/XJvhzaXZf3
MIT License
614 stars 55 forks source link

Early Source 2 models cannot be imported #283

Closed Teajai2 closed 5 months ago

Teajai2 commented 5 months ago

In the earliest manifests for SteamVR's now-defunct Performance Test, there exists several models made in the infancy of the Source 2 engine that cannot seem to be imported to Blender via SourceIO. Whenever I try, I get this error code:

Python: Traceback (most recent call last):
  File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source2_operators.py", line 55, in execute
    container = load_model(model_resource, self.scale, self.lod_mask,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\source2\vmdl_loader.py", line 78, in load_model
    objects = create_meshes(resource, ContentManager(), container, scale, lod_mask, import_attachments)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\source2\vmdl_loader.py", line 172, in create_meshes
    sub_meshes = load_external_mesh(model_resource, cm, container, scale, i, mesh_resource, import_attachments)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\source2\vmdl_loader.py", line 205, in load_external_mesh
    if morph_set_path := data_block['m_morphSet']:
                         ~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'm_morphSet'

Source 2 Viewer, another program that allows for the viewing and manipulation of Source 2 content, has a similar error when trying to import some of these earliest models.

The early SteamVR Manifest with the problem models can be found here. Some of the models in question that do not work are:

REDxEYE commented 5 months ago

Should be fixed in 5d498ee

REDxEYE commented 5 months ago

Please check

Teajai2 commented 5 months ago

I can confirm that it works! Thank you so much! image

REDxEYE commented 5 months ago

Also, what a coincident, i also have X-Ray engine addon installed :D. Been messing around SoC