def marshall(self, file):
     if getattr(file, "skip", False) == False: file = FileLike(file.read())
     self.Header.marshall(file)
     file.seek(self.Header.textureOffset)
     self.Textures = [MRL3Texture() for _ in range(self.Header.textureCount)]
     [mat.marshall(file) for mat in self.Textures]
     file.seek(self.Header.materialOffset)
     self.Materials = [MRL3Material(self.Resolver, self.Textures) for _ in range(self.Header.materialCount)]
     [mat.marshall(file) for mat in self.Materials]
Exemplo n.º 2
0
 def marshall(self, file):
     if getattr(file, "skip", False) == False: file = FileLike(file.read())
     self.Header.marshall(file)
     if self.Header.unknArr == MRL3Header.baseSignature:
         raise ValueError(
             "MHW Base Game Mrl3 is not compatible with the Current Editor or MHW Iceborne. Please use the updater tool first."
         )
     file.seek(self.Header.textureOffset)
     self.Textures = QTexList(
         [MRL3Texture() for _ in range(self.Header.textureCount)])
     [mat.marshall(file) for mat in self.Textures]
     file.seek(self.Header.materialOffset)
     self.Materials = QMatList([
         MRL3Material(self.Resolver, self.Textures)
         for _ in range(self.Header.materialCount)
     ], self)
     [mat.marshall(file) for mat in self.Materials]