2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #ifndef __BLO_BLEND_DEFS_H__
17 #define __BLO_BLEND_DEFS_H__
21 * \brief defines for blendfile codes
27 # define BLEND_MAKE_ID(a, b, c, d) ( (int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d) )
30 # define BLEND_MAKE_ID(a, b, c, d) ( (int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a) )
34 * Codes used for #BHead.code.
36 * These coexist with ID codes such as #ID_OB, #ID_SCE ... etc.
40 * Arbitrary allocated memory
41 * (typically owned by #ID's, will be freed when there are no users).
43 DATA = BLEND_MAKE_ID('D', 'A', 'T', 'A'),
45 * Used for #Global struct.
47 GLOB = BLEND_MAKE_ID('G', 'L', 'O', 'B'),
49 * Used for storing the encoded SDNA string
50 * (decoded into an #SDNA on load).
52 DNA1 = BLEND_MAKE_ID('D', 'N', 'A', '1'),
54 * Used to store thumbnail previews, written between #REND and #GLOB blocks,
55 * (ignored for regular file reading).
57 TEST = BLEND_MAKE_ID('T', 'E', 'S', 'T'),
59 * Used for #RenderInfo, basic Scene and frame range info,
60 * can be easily read by other applications without writing a full blend file parser.
62 REND = BLEND_MAKE_ID('R', 'E', 'N', 'D'),
64 * Used for #UserDef, (user-preferences data).
65 * (written to #BLENDER_STARTUP_FILE & #BLENDER_USERPREF_FILE).
67 USER = BLEND_MAKE_ID('U', 'S', 'E', 'R'),
69 * Terminate reading (no data).
71 ENDB = BLEND_MAKE_ID('E', 'N', 'D', 'B'),
74 #define BLEN_THUMB_MEMSIZE_FILE(_x, _y) (sizeof(int) * (2 + (size_t)(_x) * (size_t)(_y)))
76 #endif /* __BLO_BLEND_DEFS_H__ */