andyp123 / blender_io_mesh_bsp

Blender addon that imports Quake BSP files
108 stars 23 forks source link

Fix import error (null texture name?) #18

Closed andyp123 closed 2 years ago

andyp123 commented 4 years ago

This error occurs when importing MODELS of an in development map, which possibly had some faces with no texture on them. A simple check should probably fix this.

Traceback (most recent call last): File "C:\Users\Andy\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_mesh_bsp\bsp_importer.py", line 637, in import_bsp material_id = material_names.index(texture_name) ValueError: '' is not in list

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Andy\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_mesh_bsp__init__.py", line 126, in execute bsp_importer.import_bsp(context, self.filepath, options) File "C:\Users\Andy\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_mesh_bsp\bsp_importer.py", line 639, in import_bsp obj.data.materials.append(bpy.data.materials[texture_name]) KeyError: 'bpy_prop_collection[key]: key "" not found'

location: :-1

andyp123 commented 2 years ago

Fixed in 1.15