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