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§
- Bread
File - What a
.breadfile holds.
Enums§
- Read
File Error - Why a
.breadfile could not be read. - Write
File Error - 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
.breadfile ininput. - supported_
version - The newest version of the chunk
tagthis build reads, orNonefor 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
fileas a.breadfile toout, handingoutback. When it fails, what it wrote tooutis not a valid file.