Multi-armature mesh and animation export now working
This commit is contained in:
@@ -2,7 +2,7 @@ from ctypes import Structure, sizeof
|
||||
from typing import Type
|
||||
|
||||
from .data import Psa
|
||||
from ..shared.data import Section
|
||||
from ..shared.data import Section, PsxBone
|
||||
|
||||
|
||||
def write_section(fp, name: bytes, data_type: Type[Structure] = None, data: list = None):
|
||||
@@ -20,6 +20,6 @@ def write_section(fp, name: bytes, data_type: Type[Structure] = None, data: list
|
||||
def write_psa(psa: Psa, path: str):
|
||||
with open(path, 'wb') as fp:
|
||||
write_section(fp, b'ANIMHEAD')
|
||||
write_section(fp, b'BONENAMES', Psa.Bone, psa.bones)
|
||||
write_section(fp, b'BONENAMES', PsxBone, psa.bones)
|
||||
write_section(fp, b'ANIMINFO', Psa.Sequence, list(psa.sequences.values()))
|
||||
write_section(fp, b'ANIMKEYS', Psa.Key, psa.keys)
|
||||
|
||||
Reference in New Issue
Block a user