Skip to content

Commit

Permalink
fgm - fix create
Browse files Browse the repository at this point in the history
  • Loading branch information
HENDRIX-ZT2 committed Nov 13, 2024
1 parent 33d105b commit 657b98e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Frontier's Cobra Engine Formats",
"author": "Harlequinz Ego, HENDRIX et al.",
"blender": (4, 0, 0),
"version": (2024, 11, 12),
"version": (2024, 11, 13),
"location": "File > Import-Export",
"description": "Import-Export models, skeletons and animations",
"warning": "",
Expand Down
6 changes: 3 additions & 3 deletions __version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# this file is auto-generated by the pre-commit hook increment_version.py
VERSION = "2024.11.12"
COMMIT_HASH = "ac847d4fe"
COMMIT_TIME = "Tue Nov 12 15:18:20 2024 +0100"
VERSION = "2024.11.13"
COMMIT_HASH = "33d105b4a"
COMMIT_TIME = "Wed Nov 13 13:04:49 2024 +0100"
6 changes: 5 additions & 1 deletion modules/formats/FGM.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from generated.formats.fgm.compounds.FgmHeader import FgmHeader
from generated.formats.fgm.enums.FgmDtype import FgmDtype
from io import BytesIO

from generated.formats.ovl_base import OvlContext
from modules.formats.BaseFormat import MemStructLoader

attrib_sizes = {
Expand All @@ -19,7 +21,9 @@ class FgmLoader(MemStructLoader):
extension = ".fgm"

def create(self, file_path):
self.header = self.target_class.from_xml_file(file_path, self.ovl.context)
context = OvlContext()
context.mime_version = 6 # just a dummy to make PC2 import work
self.header = self.target_class.from_xml_file(file_path, context)
self.create_data_entry((self.update_names_buffer(),))
# need to update before writing ptrs
self.write_memory_data()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cobra-tools"
version = "2024.11.12"
version = "2024.11.13"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = "==3.11.*"
Expand Down

0 comments on commit 657b98e

Please sign in to comment.