Parik27 / DragonFF

Blender Add-on to edit RenderWare and GTA Formats
GNU General Public License v3.0
373 stars 129 forks source link

Exporting DFF with a custom version of 3.2.0.0 (according to GTA III's player.dff) results a "Sections.write_chunk()" error #311

Closed jaigitrep159 closed 5 months ago

jaigitrep159 commented 5 months ago
Traceback (most recent call last):
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\gui\dff_ot.py", line 141, in execute
    dff_exporter.export_dff(
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 1003, in export_dff
    dff_exporter.export_dff(options['file_name'])
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 989, in export_dff
    self.export_objects(objects)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\ops\dff_exporter.py", line 943, in export_objects
    self.dff.write_file(self.file_name, self.version )
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2421, in write_file
    content = self.write_memory(version)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2413, in write_memory
    data += self.write_clump()
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\DragonFF-master\gtaLib\dff.py", line 2387, in write_clump
    data = Sections.write_chunk(Clump,
TypeError: Sections.write_chunk() takes 2 positional arguments but 3 were given

Reproduce:

  1. Make a new scene
  2. Delete everything except the default cube
  3. Export parameters: Export Collision: True Export Frame Names: True Version Export: Custom Custom Version: 3.2.0.0
  4. Click Export DFF and caused a _"Sections.writechunk()" error

Tested in Blender 3.6.8 LTS, using the latest DragonFF build (native-plg update)

Psycrow101 commented 5 months ago

This should fix it

https://github.com/Parik27/DragonFF/commit/baa449d0d409e797145a506cc039ca428302a3ea

jaigitrep159 commented 5 months ago

image image Thank you for this small fix.