skppy.parser.model_parser¶
Full model.dat -> Model pipeline.
Usage:
import zipfile
from skppy.parser.model_parser import parse_model
with zipfile.ZipFile(filepath) as zf:
data = zf.read("model.dat")
model = parse_model(data, zf, header, document)
- skppy.parser.model_parser.parse_model(data: bytes, zip_file: _zipfile.ZipFile, header: SkpHeader, document: SkpDocument, *, import_vray_materials: bool = False) Model[source]
Decode a model.dat byte string and return a fully populated Model.
- Parameters:
data (bytes) – Raw bytes of the model.dat entry from the .skp ZIP archive.
zip_file (zipfile.ZipFile) – Open ZIP handle used to load embedded texture images.
header (SkpHeader) – Parsed header returned by
parse_header().document (SkpDocument) – Parsed document metadata (version, guid, etc.).
- Returns:
Fully assembled model containing entities, materials, layers, definitions, cameras, scenes, and rendering options.
- Return type:
Model