SC2Mapster / m3addon

Blender Addon to import and export m3 files
GNU General Public License v2.0
49 stars 18 forks source link

Error exporting .m3 with a PhysicsMeshObject #41

Closed DerekX closed 2 years ago

DerekX commented 2 years ago

Traceback (most recent call last): File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 2803, in export exporter.export(filename) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 71, in export model = self.createModel(m3FileName) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 220, in createModel self.initRigidBodies(model) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1687, in initRigidBodies self.initPhysicsMesh(physicsShape, m3PhysicsShape) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1662, in initPhysicsMesh m3PhysicsShape.faces.extend(faceIndices) AttributeError: 'M3Structure' object has no attribute 'faces' Python: Traceback (most recent call last): File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\ui\base.py", line 64, in execute return m3export.export(scene, self, self.properties.filepath) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 2803, in export exporter.export(filename) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 71, in export model = self.createModel(m3FileName) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 220, in createModel self.initRigidBodies(model) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1687, in initRigidBodies self.initPhysicsMesh(physicsShape, m3PhysicsShape) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1662, in initPhysicsMesh m3PhysicsShape.faces.extend(faceIndices) AttributeError: 'M3Structure' object has no attribute 'faces'

location: :-1

DerekX commented 2 years ago

I also encounter this error after trying to delete the PhysicsMeshObject:

Traceback (most recent call last): File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 2803, in export exporter.export(filename) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 71, in export model = self.createModel(m3FileName) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 220, in createModel self.initRigidBodies(model) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1687, in initRigidBodies self.initPhysicsMesh(physicsShape, m3PhysicsShape) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1638, in initPhysicsMesh meshObject = scene.objects[physicsShape.meshObjectName] KeyError: 'bpy_prop_collection[key]: key "PhysicsMeshObject" not found' Python: Traceback (most recent call last): File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\ui\base.py", line 64, in execute return m3export.export(scene, self, self.properties.filepath) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 2803, in export exporter.export(filename) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 71, in export model = self.createModel(m3FileName) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 220, in createModel self.initRigidBodies(model) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1687, in initRigidBodies self.initPhysicsMesh(physicsShape, m3PhysicsShape) File "C:\Users\Derek Hendrickson\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\m3addon-master\m3export.py", line 1638, in initPhysicsMesh meshObject = scene.objects[physicsShape.meshObjectName] KeyError: 'bpy_prop_collection[key]: key "PhysicsMeshObject" not found'

location: :-1

DerekX commented 2 years ago

Found a solution/work-around, it was a physics shape associated with a faulty rigid body. Delete or let me know if an even better solution is found.