X-Hax / SonicAdventureBlenderIO

An addon for Blender 4.0+, which adds exporting options for all sonic adventure 3D formats (and a bit more)!
GNU General Public License v3.0
21 stars 1 forks source link

SA2 Event Exporting: Event 0203 failure #20

Closed Marswastakenwastaken closed 1 month ago

Marswastakenwastaken commented 3 months ago

Issue

When trying to export E0203, an error is thrown saying that Scene Content is not yet written.

Error

Python: Traceback (most recent call last):
  File "C:\Users\Mars1\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SonicAdventureBlenderIO\source\register\operators\base.py", line 26, in execute
    return self._execute(context)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mars1\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SonicAdventureBlenderIO\source\register\operators\base_export_operators.py", line 25, in _execute
    return self.export(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mars1\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SonicAdventureBlenderIO\source\register\operators\export_operators.py", line 482, in export
    exporter.export(self.filepath, self.export_textures)
  File "C:\Users\Mars1\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SonicAdventureBlenderIO\source\exporting\o_event.py", line 690, in export
    event.WriteToFiles(filepath)
System.InvalidOperationException: Scene Content has not yet been written!

   at SA3D.SA2Event.Model.Scene.Write(EndianStackWriter writer, PointerLUT lut)

   at SA3D.SA2Event.Model.ModelData.WriteEventData(EndianStackWriter writer, Dictionary`2 motionLUT, PointerLUT lut)

   at SA3D.SA2Event.Model.ModelData.Write(EndianStackWriter writer, EventMotion[]& motions)

   at SA3D.SA2Event.Model.ModelData.WriteToBytes(EventMotion[]& motions)

   at SA3D.SA2Event.Event.WriteToSource()

   at SA3D.SA2Event.Event.WriteToFiles(String filepath)

   at InvokeStub_Event.WriteToFiles(Object, Object, IntPtr*)

   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Woodsdolphin416 commented 2 months ago

The same thing happened to me and i hope it gets fixed as im trying to make my first model swap and it would make it way easier if it worked

Justin113D commented 1 month ago

Fixed in release 2.2.0