def read(self, reader: ByteIO): entry = reader.tell() self.lodCount, self.lodOffset = reader.read_fmt('ii') with reader.save_current_pos(): if self.lodCount > 0 and self.lodOffset != 0: reader.seek(entry + self.lodOffset) for _ in range(self.lodCount): self.vtx_model_lods.append(SourceVtxModelLod().read(reader, self)) return self
def read(self, reader: ByteIO): entry = reader.tell() self.model_count, self.model_offset = reader.read_fmt('II') with reader.save_current_pos(): reader.seek(entry + self.model_offset) for _ in range(self.model_count): self.vtx_models.append(SourceVtxModel().read(reader)) return self
def read(self, reader: ByteIO): self.x, self.y, self.z = reader.read_fmt('fff') return self