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, the program data and the surface paint when there are any, the roles of leaves that are not models, the volumes that act on models when there are any, then one mesh chunk per mesh of the scene, in its order, the support previews when there are any, and last the chunks this build does not know.

Reading keeps the chunks this build does not know, official or private, as they are, and writing writes them back at the end, in their order: a program that opens a file and saves it does not drop other programs’ chunks. A program that changes the scene should drop them, since they may name nodes or meshes by an index that changed (section 7.2). Reading skips a chunk whose tag is not four ASCII letters or digits starting with a letter, which no writer may write. 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.