Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 #ifndef BKE_GLOBAL_H 00028 #define BKE_GLOBAL_H 00029 00039 #include "DNA_listBase.h" 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00045 /* forwards */ 00046 struct Main; 00047 struct Object; 00048 struct BME_Glob; 00049 00050 typedef struct Global { 00051 00052 /* active pointers */ 00053 struct Main *main; 00054 00055 /* strings: lastsaved */ 00056 char ima[256], lib[256]; 00057 00058 /* flag: if != 0 G.main->name contains valid relative base path */ 00059 int relbase_valid; 00060 00061 /* strings of recent opened files */ 00062 struct ListBase recent_files; 00063 00064 short afbreek, moving, file_loaded; 00065 char background; 00066 char factory_startup; 00067 short winpos, displaymode; /* used to be in Render */ 00068 short rendering; /* to indicate render is busy, prevent renderwindow events etc */ 00069 00070 short rt; 00071 int f; 00072 00073 /* Used for BMesh transformations */ 00074 struct BME_Glob *editBMesh; 00075 00076 /* Frank's variables */ 00077 int save_over; 00078 00079 /* Rob's variables (keep here for WM recode) */ 00080 int have_quicktime; 00081 int ui_international; 00082 int charstart; 00083 int charmin; 00084 int charmax; 00085 struct VFont *selfont; 00086 struct ListBase ttfdata; 00087 00088 /* this variable is written to / read from FileGlobal->fileflags */ 00089 int fileflags; 00090 00091 /* save the allowed windowstate of blender when using -W or -w */ 00092 int windowstate; 00093 } Global; 00094 00095 /* **************** GLOBAL ********************* */ 00096 00097 /* G.f */ 00098 #define G_RENDER_OGL (1 << 0) 00099 #define G_SWAP_EXCHANGE (1 << 1) 00100 /* also uses G_FILE_AUTOPLAY */ 00101 /* #define G_RENDER_SHADOW (1 << 3) */ /* temp flag, removed */ 00102 #define G_BACKBUFSEL (1 << 4) 00103 #define G_PICKSEL (1 << 5) 00104 00105 /* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */ 00106 00107 #define G_DEBUG (1 << 12) 00108 #define G_SCRIPT_AUTOEXEC (1 << 13) 00109 #define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */ 00110 00111 /* #define G_NOFROZEN (1 << 17) also removed */ 00112 /* #define G_GREASEPENCIL (1 << 17) also removed */ 00113 00114 /* #define G_AUTOMATKEYS (1 << 30) also removed */ 00115 00116 /* G.fileflags */ 00117 00118 #define G_AUTOPACK (1 << 0) 00119 #define G_FILE_COMPRESS (1 << 1) 00120 #define G_FILE_AUTOPLAY (1 << 2) 00121 #define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */ 00122 #define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */ 00123 #define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */ 00124 /* #define G_FILE_SHOW_PROFILE (1 << 6) */ /* deprecated */ 00125 #define G_FILE_LOCK (1 << 7) 00126 #define G_FILE_SIGN (1 << 8) 00127 /* #define G_FILE_PUBLISH (1 << 9) */ /* deprecated */ 00128 #define G_FILE_NO_UI (1 << 10) 00129 /* #define G_FILE_GAME_TO_IPO (1 << 11) */ /* deprecated */ 00130 #define G_FILE_GAME_MAT (1 << 12) /* deprecated */ 00131 /* #define G_FILE_DISPLAY_LISTS (1 << 13) */ /* deprecated */ 00132 #define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */ 00133 #define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */ 00134 /* #define G_FILE_GLSL_NO_LIGHTS (1 << 16) */ /* deprecated */ 00135 #define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */ 00136 #define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */ 00137 #define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */ 00138 #define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */ 00139 #define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */ 00140 #define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */ 00141 #define G_FILE_RECOVER (1 << 23) 00142 #define G_FILE_RELATIVE_REMAP (1 << 24) 00143 #define G_FILE_HISTORY (1 << 25) 00144 #define G_FILE_MESH_COMPAT (1 << 26) /* BMesh option to save as older mesh format */ 00145 00146 /* G.windowstate */ 00147 #define G_WINDOWSTATE_USERDEF 0 00148 #define G_WINDOWSTATE_BORDER 1 00149 #define G_WINDOWSTATE_FULLSCREEN 2 00150 00151 /* ENDIAN_ORDER: indicates what endianness the platform where the file was 00152 * written had. */ 00153 #if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ ) 00154 # error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined. 00155 #endif 00156 00157 #define L_ENDIAN 1 00158 #define B_ENDIAN 0 00159 00160 #ifdef __BIG_ENDIAN__ 00161 # define ENDIAN_ORDER B_ENDIAN 00162 #else 00163 # define ENDIAN_ORDER L_ENDIAN 00164 #endif 00165 00166 /* G.moving, signals drawing in (3d) window to denote transform */ 00167 #define G_TRANSFORM_OBJ 1 00168 #define G_TRANSFORM_EDIT 2 00169 #define G_TRANSFORM_MANIP 4 00170 #define G_TRANSFORM_PARTICLE 8 00171 00172 /* G.special1 */ 00173 00174 /* Memory is allocated where? blender.c */ 00175 extern Global G; 00176 00177 #ifdef __cplusplus 00178 } 00179 #endif 00180 00181 #endif