2 * blenlib/BKE_global.h (mar-2001 nzc)
4 * Global settings, handles, pointers. This is the root for finding
5 * any data in Blender. This block is not serialized, but built anew
6 * for every fresh Blender run.
10 * ***** BEGIN GPL LICENSE BLOCK *****
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software Foundation,
24 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
27 * All rights reserved.
29 * The Original Code is: all of this file.
31 * Contributor(s): none yet.
33 * ***** END GPL LICENSE BLOCK *****
38 #include "DNA_listBase.h"
49 typedef struct Global {
54 /* strings: lastsaved */
55 char ima[256], sce[256], lib[256];
57 /* flag: if != 0 G.sce contains valid relative base path */
60 /* strings of recent opend files */
61 struct ListBase recent_files;
63 short afbreek, moving;
65 short winpos, displaymode; /* used to be in Render */
66 short rendering; /* to indicate render is busy, prevent renderwindow events etc */
71 /* Used for BMesh transformations */
72 struct BME_Glob *editBMesh;
74 /* Frank's variables */
77 /* Rob's variables (keep here for WM recode) */
83 struct VFont *selfont;
84 struct ListBase ttfdata;
86 /* libtiff flag used to determine if shared library loaded for libtiff*/
89 /* this variable is written to / read from FileGlobal->fileflags */
92 /* save the allowed windowstate of blender when using -W or -w */
95 /* ndof device found ? */
98 /* confusing... G.f and G.flags */
103 /* **************** GLOBAL ********************* */
106 #define G_RENDER_OGL (1 << 0)
107 #define G_SWAP_EXCHANGE (1 << 1)
108 /* also uses G_FILE_AUTOPLAY */
109 #define G_RENDER_SHADOW (1 << 3)
110 #define G_BACKBUFSEL (1 << 4)
111 #define G_PICKSEL (1 << 5)
113 #define G_FACESELECT (1 << 8)
115 #define G_VERTEXPAINT (1 << 10)
117 #define G_DEBUG (1 << 12)
118 #define G_DOSCRIPTLINKS (1 << 13)
120 #define G_WEIGHTPAINT (1 << 15)
121 #define G_TEXTUREPAINT (1 << 16)
122 /* #define G_NOFROZEN (1 << 17) also removed */
123 #define G_GREASEPENCIL (1 << 17)
125 #define G_PARTICLEEDIT (1 << 30)
127 /* #define G_AUTOMATKEYS (1 << 30) also removed */
128 #define G_HIDDENHANDLES (1 << 31) /* used for curves only */
130 /* macro for testing face select mode
131 * Texture paint could be removed since selected faces are not used
132 * however hiding faces is useful */
133 #define FACESEL_PAINT_TEST ((G.f&G_FACESELECT) && (G.f & (G_VERTEXPAINT|G_WEIGHTPAINT|G_TEXTUREPAINT)))
137 #define G_AUTOPACK (1 << 0)
138 #define G_FILE_COMPRESS (1 << 1)
139 #define G_FILE_AUTOPLAY (1 << 2)
140 #define G_FILE_ENABLE_ALL_FRAMES (1 << 3)
141 #define G_FILE_SHOW_DEBUG_PROPS (1 << 4)
142 #define G_FILE_SHOW_FRAMERATE (1 << 5)
143 #define G_FILE_SHOW_PROFILE (1 << 6)
144 #define G_FILE_LOCK (1 << 7)
145 #define G_FILE_SIGN (1 << 8)
146 #define G_FIle_PUBLISH (1 << 9)
147 #define G_FILE_NO_UI (1 << 10)
148 #define G_FILE_GAME_TO_IPO (1 << 11)
149 #define G_FILE_GAME_MAT (1 << 12)
150 #define G_FILE_DISPLAY_LISTS (1 << 13)
151 #define G_FILE_SHOW_PHYSICS (1 << 14)
152 #define G_FILE_GAME_MAT_GLSL (1 << 15)
153 #define G_FILE_GLSL_NO_LIGHTS (1 << 16)
154 #define G_FILE_GLSL_NO_SHADERS (1 << 17)
155 #define G_FILE_GLSL_NO_SHADOWS (1 << 18)
156 #define G_FILE_GLSL_NO_RAMPS (1 << 19)
157 #define G_FILE_GLSL_NO_NODES (1 << 20)
158 #define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21)
159 #define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22)
162 #define G_WINDOWSTATE_USERDEF 0
163 #define G_WINDOWSTATE_BORDER 1
164 #define G_WINDOWSTATE_FULLSCREEN 2
166 /* ENDIAN_ORDER: indicates what endianness the platform where the file was
170 extern short ENDIAN_ORDER;
172 /* G.moving, signals drawing in (3d) window to denote transform */
173 #define G_TRANSFORM_OBJ 1
174 #define G_TRANSFORM_EDIT 2
175 #define G_TRANSFORM_MANIP 4
176 #define G_TRANSFORM_PARTICLE 8
180 /* Memory is allocated where? blender.c */