Skip to main content

Module file

Module file 

Source
Expand description

A whole .bread file: the thumbnail when there is one, the scene chunk, the metadata when there is any, the project settings, the supports, the hollows and the surface paint when there are any, the roles of leaves that are not models, then one mesh chunk per mesh of the scene, in its order, and last the support previews when there are any.

Reading skips the chunks this build does not know, official or private, and writing leaves them out, as section 7.2 allows. It also skips supports and hollows chunks of version 1, which only drafts of the format wrote, as section 7.3 allows: their models open without editable supports, and their hollows without the original. The support previews of draft supports are skipped with them, since they could not be checked against the supports.

Structs§

BreadFile
What a .bread file holds.

Enums§

ReadFileError
Why a .bread file could not be read.
WriteFileError
Why a file could not be written.

Constants§

THUMBNAIL_TAG
The tag of the thumbnail chunk, whose payload is a PNG file. Section 8 asks writers to put it first, so a program that only wants the picture reads one chunk.
THUMBNAIL_VERSION
The thumbnail chunk version this build writes and reads.

Functions§

read_file
Reads the .bread file in input.
supported_version
The newest version of the chunk tag this build reads, or None for a tag it does not know, which a reader skips. Every version from 1 up to it is read, though older supports and hollows chunks are skipped; any other version makes the file unreadable.
write_file
Writes file as a .bread file to out, handing out back. When it fails, what it wrote to out is not a valid file.