emd4600/SporeModder-Blender-Addons

Error when exporting a model

Loreb29 opened this issue · 1 comments

I'm trying to export a mouth, it is already animated, is below the vertices limit, already has the materials on it, etc, but it gives me this error, i also have tried exporting it in Blender 2.83, still fails:
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\sporemodder__init__.py", line 147, in execute
return export_rw4(file)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\sporemodder\rw4_exporter.py", line 1191, in export_rw4
exporter.export_mesh_object(obj)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\sporemodder\rw4_exporter.py", line 727, in export_mesh_object
vertices, triangles, indices_map = self.process_mesh(
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\sporemodder\rw4_exporter.py", line 411, in process_mesh
self.process_vertex_bones(obj, b_vertex, vertices, base255)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\sporemodder\rw4_exporter.py", line 289, in process_vertex_bones
index = next(i for i, bone in enumerate(self.b_armature_object.data.bones) if bone.name == v_group.name)
StopIteration

location: :-1

Fixed in commit 2547476, a more user-friendly error message will show now. The problem is that there are vertex groups with names different from the bones (either the bone does not exist or was renamed).