Module ascii_writer

Module ascii_writer 

Source
Expand description

ASCII MDL writer. ASCII MDL writer.

Serializes an Mdl model into the human-readable ASCII MDL format used by the KotOR engine’s text-mode model parser. The output is compatible with mdledit, kotorblender, and the engine’s native ParseNode / InternalParseField dispatch pipeline.

The writer emits a deterministic representation: geometry header, recursive DFS node tree, then animations. Controller values are converted from binary quaternion to ASCII axis-angle for orientation data, and unknown controller codes get a controller_<N> fallback name.

Enums§

MdlAsciiError
Errors specific to ASCII MDL serialization and parsing.

Functions§

write_mdl_ascii
Writes an ASCII MDL representation to a writer.
write_mdl_ascii_to_string
Serializes an MDL to an ASCII string.