Beispiel #1
0
    def __init__(self, f):
        self.version = readU32(f)
        self.ID = f.read(4).decode("utf-8-sig")
        self.padding = readU64(f)
        self.pointersOffs = readU64(
            f)  # uint64  pointersOffs <format=hex>; // AssetsPointer in Tyrant
        self.colOffs = readU64(
            f)  # uint64  colOffs <format=hex>; // UnkPointer
        self.motListNameOffs = readU64(
            f)  # uint64  motListNameOffs <format=hex>; //NamePointer
        if self.version != 60:
            self.padding = readU64(f)  #uint64  padding; //UnkPointer01
        self.numOffs = readU32(f)  # AssetCount
        f.seek(self.motListNameOffs)
        self.motListName = read_wstring(f)
        #pos = f.tell()

        #--gather pointers and pointer names:
        f.seek(self.pointersOffs)
        self.POINTERS = []
        for i in range(0, self.numOffs):
            if self.version == 13 or self.version == 14:
                self.POINTERS.append(PointerMcam(f))
            else:
                self.POINTERS.append(Pointer(f))
            print(str(i) + "_" + self.POINTERS[i].motName)
Beispiel #2
0
 def __init__(self, f, start):
     self.version = readU32(f)  #uint
     self.ID = f.read(4).decode("utf-8-sig")  #readU32(f) # char
     self.ukn00 = readU32(f)  # uint32
     self.uknOffs = readU32(f)  #uint32
     self.offsToBoneHdrOffs = readU64(f)  #uint64     #BoneBaseDataPointer
     self.boneClipHdrOffs = readU64(
         f)  #uint64 FSkip(16) = readU32(f)   #BoneDataPointer
     f.seek(16, 1)
     self.clipFileOffset = readU64(f)  #uint64
     self.Offs1 = readU64(f)  # uint64
     f.seek(8, 1)
     self.Offs2 = readU64(f)  #uint64
     self.namesOffs = readU64(f)  #uint64           #namePointer
     self.frameCount = readFloat(f)  #frameCount
     self.blending = readFloat(f)
     self.uknFloat = readFloat(f)
     self.uknFloat = readFloat(f)
     self.boneCount = readUShort(f)  #ushort
     self.boneClipCount = readUShort(f)  #ushort
     self.uknPointer2Count = readUByte(f)  #ubyte
     self.uknPointer3Count = readUByte(f)  # ubyte
     self.FrameRate = readUShort(f)
     self.uknPointerCount = readUShort(f)
     self.uknShort = readUShort(f)
     f.seek(self.namesOffs + start)
     self.MOT_NAME = read_wstring(f)
Beispiel #3
0
    def __init__(self, f, MOT_LIST):
        start = f.tell()
        self.start = start
        self.MOT_LIST = MOT_LIST
        version = 99  # list version
        self.fileSize = FileSize(f)
        self.MOT_HEADER = MotHdr(f, start)

        #BONE HEADERS
        if self.MOT_HEADER.offsToBoneHdrOffs + start + 16 < self.fileSize:
            f.seek(self.MOT_HEADER.offsToBoneHdrOffs + start)
            self.BONE_HEADERS = BoneHeaders(f, start)

        #CLIP HEADERS
        f.seek(self.MOT_HEADER.boneClipHdrOffs + start)

        self.BONE_CLIP_HEADERS = []
        for i in range(0, self.MOT_HEADER.boneClipCount):
            self.BONE_CLIP_HEADERS.append(BoneClipHeader(f, self))

        skipToNextLine(f)
        #CLIP TRACKS
        #~~~~~~~~~~~~~~~~~~~
        self.CLIP_TRACKS = []
        for j in range(0, self.MOT_HEADER.boneClipCount):
            f.seek(self.BONE_CLIP_HEADERS[j].trackHdrOffs + start)
            self.CLIP_TRACKS.append(Tracks(f, self, j))  #TRACKS tracks;

        #~~~~~~~~~~~~~~~~~~~
        if (self.MOT_HEADER.Offs1 > 0):
            f.seek(self.MOT_HEADER.Offs1 + start)
            JMAP = read_wstring(f)

        if (self.MOT_HEADER.clipFileOffset > 0):  #&& MOT_HEADER.version != 43
            f.seek(self.MOT_HEADER.clipFileOffset + start)
Beispiel #4
0
    def __init__(self, f, start):
        self.boneNameOffs = readU64(f)
        position = f.tell()
        f.seek(self.boneNameOffs + start)
        self.boneName = read_wstring(f)
        f.seek(position)
        self.parentOffs = readU64(f)
        self.childOffs = readU64(f)
        self.nextSiblingOffs = readU64(f)

        self.translation = [
            readFloat(f),
            readFloat(f),
            readFloat(f),
            readFloat(f)
        ]
        self.quaternion = [
            readFloat(f),
            readFloat(f),
            readFloat(f),
            readFloat(f)
        ]

        self.Index = readU32(f)
        self.boneHash = readU32(f)  # uint   //MurMur3
        self.padding = readU64(f)
Beispiel #5
0
    def __init__(self, f):
        self.Address = readU64(f)

        ##get string and return
        pos = f.tell()
        self.motName = read_wstring(f, address=self.Address + 68)
        f.seek(pos)

        if self.Address == 0:
            self.motName = ""
Beispiel #6
0
    def __init__(self, f, list_header, MOT_LIST):
        start = f.tell()
        self.start = start
        self.MOT_LIST = MOT_LIST
        self.fileSize = FileSize(f)

        self.MCAM_HEADER = McamHdr(f, start)

        f.seek(self.MCAM_HEADER.nameStringOffset +
               start)  # FSeek(offsets[4] + startof(this));
        self.name = read_wstring(f)  # wstring name3;

        f.seek(self.MCAM_HEADER.motionTrackStartOffset + start)
        self.motion = McamMotion(f, start, list_header.version)

        # ZOOM CAMERA
        f.seek(self.MCAM_HEADER.zoomStartOffset + start)
        self.zoom = McamZoom(f, start, list_header.version)

        print("cake")
Beispiel #7
0
 def __init__(self, f, start):
     self.String = read_wstring(f)