Context#

Shared context between decoder and encoder.

Options#

Shared user options between decoder and encoder.

class UserOptions(model_formats=None, parse_skeleton=False, parse_animation=False, overwrite=True)[source]#

Shared user options between decoder and encoder.

model_formats: Optional[Sequence[FileFormat]] = None#
parse_skeleton: bool = False#
parse_animation: bool = False#
overwrite: bool = True#
property default_model_formats#

Content#

Shared content data between decoder and encoder.

class FileContent(type=FileType.NONE)[source]#

Bases: ABC

Base dataclass for file content storage.

type: FileType = 'none'#
reset()[source]#
class ModelContent(type=FileType.MODEL, version=0.0, flags=<factory>, scene=<factory>)[source]#

Bases: FileContent

Model content storage.

type: FileType = 'model'#
version: float = 0.0#
flags: defaultdict[int, bool]#
scene: ModelScene#
class TextureContent(type=FileType.TEXTURE, width=0, height=0, mipmap_count=0, format=<factory>, texture=<factory>)[source]#

Bases: FileContent, Generic[TextureType]

Texture content storage.

type: FileType = 'texture'#
width: int = 0#
height: int = 0#
mipmap_count: int = 0#
format: bytes#
texture: TypeVar(TextureType, bound= Texture)#
property is_cubemap: bool#
property is_compressed: bool#
property fourcc: bytes#
class ImageContent(type=FileType.IMAGE, image=<factory>)[source]#

Bases: FileContent

Image content storage.

type: FileType = 'image'#
image: bytes#
class TextureArrayContent(type=FileType.TEXARR, count=0, textures=<factory>)[source]#

Bases: FileContent

Texture array storage.

type: FileType = 'texarr'#
count: int = 0#
textures: list[tuple[str, bytes]]#
class NbtContent(type=FileType.NBT, value=None)[source]#

Bases: FileContent

type: FileType = 'nbt'#
value: None | int | float | bytes | str | list[int] | list[None | int | float | bytes | str | list[int] | list[NbtValue] | dict[str, NbtValue]] | dict[str, None | int | float | bytes | str | list[int] | list[NbtValue] | dict[str, NbtValue]] = None#