diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py index 4c7080bc52335972b4914336f79efe53db71cd01..0c3a29537784ca625cdaadad7d1fa6e8e5d413bd 100644 --- a/io_scene_3ds/import_3ds.py +++ b/io_scene_3ds/import_3ds.py @@ -427,8 +427,11 @@ def process_next_chunk(context, file, previous_chunk, imported_objects, CONSTRAI # in rare cases no materials defined. bmesh.materials.append(bmat) # can be None - for fidx in faces: - bmesh.polygons[fidx].material_index = mat_idx + if bmesh.polygons: + for fidx in faces: + bmesh.polygons[fidx].material_index = mat_idx + else: + print("\tError: Mesh has no faces!") if uv_faces: uvl = bmesh.uv_layers.active.data[:] @@ -1626,6 +1629,7 @@ def load_3ds(filepath, context, CONSTRAIN=10.0, UNITS=False, IMAGE_SEARCH=True, # here we go! read_chunk(file, current_chunk) if current_chunk.ID != PRIMARY: + context.window.cursor_set('DEFAULT') print("\tFatal Error: Not a valid 3ds file: %r" % filepath) file.close() return