The code determines with what logic the data must be read. Code describes different types of file-blocks. The above table describes how a file-block-header is structured: Number of structure located in this file-block Memory address the structure was located when written to disk Total length of the data after the file-block-header Pointer at the moment the data was written to disk Īs we can see below, depending on the pointer-size stored in the file-header, a file-block-headerĬan be 20 or 24 bytes long, hence it is always aligned at 4 bytes. This hex-dump describes a file-header created with blender 2.54.0 on little-endian hardware with a 32 bits pointer length.Ġ000 0000: BLENDER_v254 įile-blocks contain a " file-block header " and "file-block data". Is different between the blend-file and the PC your using, Blender changes it to the byte ordering In little endian as 0x1Dh, 0x2Ch, 0x3Bh, 0x4Ah īlender supports little-endian and big-endian. In big endian as 0x4Ah, 0x3Bh, 0x2Ch, 0x1Dh Writing the integer 0x4A3B2C1Dh, will be ordered: Nowadays, little-endian is the most commonly used. In a little endian ordering, largest part of the value is placed on the last byteĪnd the smallest part of the value is placed on the first byte. The lowest part of the value is placed on the last byte, In a big endian ordering, the largest part of the value is placed on the first byte and ![]() Version of Blender the file was created in '254' means version 2.54 Įndianness addresses the way values are ordered in a sequence of bytes(see the example below): Type of byte ordering used 'v' means little endian and 'V' means big endian. '_' means 4 bytes or 32 bit and '-' means 8 bytes or 64 bits. Size of a pointer all pointers in the file are stored in this format. The next table describes the information in the file-header. Translation or transformation is done during saving. This is requiredĪs all data inside the blend-file is ordered in that way, because no Theįile-header has information on Blender (version-number) and the PC theīlend-file was saved on (pointer-size and endianness). The first 12 bytes of every blend-file is the file-header. The blend-file ends with a file-block called 'ENDB' Įach file-block has a file-block header and file-block data Īt the end of the blend-file there is a section called " Structure DNA ", which lists all the internal structures of the Blender release the file was created in This section explains how the global file-structure can be read.Ī blend-file always start with the file-header Īfter the file-header, follows a list of file-blocks (the default blend file of Blender 2.48 contains more than 400 of these file-blocks). Internally used structures and the file can really explain itself. The blend-file-format is not well documented, as it does not differ from The more difference between releases the more logic is Logic which can transform and translate every structure used by aīlender release to the one of the release you're using. In the source code of blender there is actually Transformation and translation logic to implement the backward and Structures of the Blender release you're using and a lot of Blender uses thisĬatalog together with the data in the file, the internal Blender When Blender loads a blend-file, the DNA-structures are read first.īlender creates a catalog of these DNA-structures. Saving the file, this is done during loading. Backward and upwards compatibility is not implemented when Blender creates the blend-files in this manner since There is no effort taken to make blend-filesīinary the same. These structures will act as blue-prints when Blender loads the file.īlend-files can be different when stored on different hardware platforms After the data, all internally Blender structures are stored. A file-block-header contains clues on how to interpret theĭata. BlenderĪchieves this by saving data in memory to disk without any ![]() ![]() Saving complex scenes in Blender is done within seconds. Ton Roosendaalĭemonstrated that in December 2008 by loading a 1.0 blend-file using Have excellent downward and upward compatibility. Loading and saving in Blender is very fast and Blender is known to The article is written to be programming language independent and I've With the goal to read the output resolution from the Scene. In this article we'll be using the default blend-file from Blender 2.54, When that's done we can use these DNA-structures to read information They hold the blue-prints of the blend-file and the key We look at the global file-structure of a blend-file (the file-headerĪfter this is explained, we go deeper to the core of the blend-file, theĭNA-structures. Why the blend-file-format is not that well documented, as fromīlender's perspective this is not needed. Blend-file-format with a request to tool-makers to support blend-file.įirst I'll describe how Blender works with blend-files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |