Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Variables
BKE_global.h File Reference
#include "BLI_utildefines.h"
#include "DNA_listBase.h"

Go to the source code of this file.

Classes

struct  Global
 

Macros

#define G_FLAG_ALL_RUNTIME
 
#define G_FLAG_ALL_READFILE   0
 
#define G_DEBUG_ALL
 
#define G_FILE_FLAG_ALL_RUNTIME   (G_FILE_NO_UI | G_FILE_RECOVER_READ | G_FILE_RECOVER_WRITE)
 
#define G_MAIN   (G).main
 

Typedefs

typedef struct Global Global
 

Enumerations

enum  {
  G_FLAG_RENDER_VIEWPORT = (1 << 0) , G_FLAG_PICKSEL = (1 << 2) , G_FLAG_EVENT_SIMULATE = (1 << 3) , G_FLAG_USERPREF_NO_SAVE_ON_EXIT = (1 << 4) ,
  G_FLAG_SCRIPT_AUTOEXEC = (1 << 13) , G_FLAG_SCRIPT_OVERRIDE_PREF = (1 << 14) , G_FLAG_SCRIPT_AUTOEXEC_FAIL = (1 << 15) , G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET = (1 << 16)
}
 
enum  {
  G_DEBUG = (1 << 0) , G_DEBUG_FFMPEG = (1 << 1) , G_DEBUG_PYTHON = (1 << 2) , G_DEBUG_EVENTS = (1 << 3) ,
  G_DEBUG_HANDLERS = (1 << 4) , G_DEBUG_WM = (1 << 5) , G_DEBUG_JOBS = (1 << 6) , G_DEBUG_FREESTYLE = (1 << 7) ,
  G_DEBUG_DEPSGRAPH_BUILD = (1 << 8) , G_DEBUG_DEPSGRAPH_EVAL = (1 << 9) , G_DEBUG_DEPSGRAPH_TAG = (1 << 10) , G_DEBUG_DEPSGRAPH_TIME = (1 << 11) ,
  G_DEBUG_DEPSGRAPH_NO_THREADS = (1 << 12) , G_DEBUG_DEPSGRAPH_PRETTY = (1 << 13) , G_DEBUG_DEPSGRAPH_UUID = (1 << 14) , G_DEBUG_DEPSGRAPH ,
  G_DEBUG_SIMDATA = (1 << 15) , G_DEBUG_GPU = (1 << 16) , G_DEBUG_IO = (1 << 17) , G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18) ,
  G_DEBUG_XR = (1 << 19) , G_DEBUG_XR_TIME = (1 << 20) , G_DEBUG_GHOST = (1 << 21) , G_DEBUG_WINTAB = (1 << 22)
}
 
enum  {
  G_FILE_AUTOPACK = (1 << 0) , G_FILE_COMPRESS = (1 << 1) , G_FILE_NO_UI = (1 << 10) , G_FILE_RECOVER_READ = (1 << 23) ,
  G_FILE_RECOVER_WRITE = (1 << 24)
}
 
enum  {
  G_TRANSFORM_OBJ = (1 << 0) , G_TRANSFORM_EDIT = (1 << 1) , G_TRANSFORM_SEQ = (1 << 2) , G_TRANSFORM_FCURVES = (1 << 3) ,
  G_TRANSFORM_WM = (1 << 4) , G_TRANSFORM_CURSOR = (1 << 5)
}
 

Variables

Global G
 

Detailed Description

Global settings

Global settings, handles, pointers. This is the root for finding any data in Blender. This block is not serialized, but built anew for every fresh Blender run.

Definition in file BKE_global.h.

Macro Definition Documentation

◆ G_DEBUG_ALL

#define G_DEBUG_ALL
Value:
@ G_DEBUG
Definition: BKE_global.h:174
@ G_DEBUG_GHOST
Definition: BKE_global.h:199
@ G_DEBUG_IO
Definition: BKE_global.h:194
@ G_DEBUG_JOBS
Definition: BKE_global.h:180
@ G_DEBUG_FFMPEG
Definition: BKE_global.h:175
@ G_DEBUG_WINTAB
Definition: BKE_global.h:200
@ G_DEBUG_DEPSGRAPH
Definition: BKE_global.h:190
@ G_DEBUG_WM
Definition: BKE_global.h:179
@ G_DEBUG_EVENTS
Definition: BKE_global.h:177
@ G_DEBUG_PYTHON
Definition: BKE_global.h:176

Definition at line 203 of file BKE_global.h.

◆ G_FILE_FLAG_ALL_RUNTIME

#define G_FILE_FLAG_ALL_RUNTIME   (G_FILE_NO_UI | G_FILE_RECOVER_READ | G_FILE_RECOVER_WRITE)

Run-time only #G.fileflags which are never read or written to/from Blend files. This means we can change the values without worrying about do-versions.

Definition at line 243 of file BKE_global.h.

◆ G_FLAG_ALL_READFILE

#define G_FLAG_ALL_READFILE   0

Flags to read from blend file.

Definition at line 170 of file BKE_global.h.

◆ G_FLAG_ALL_RUNTIME

#define G_FLAG_ALL_RUNTIME
Value:
G_FLAG_USERPREF_NO_SAVE_ON_EXIT | \
\
/* #BPY_python_reset is responsible for resetting these flags on file load. */ \
G_FLAG_SCRIPT_AUTOEXEC_FAIL | G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)
@ G_FLAG_SCRIPT_OVERRIDE_PREF
Definition: BKE_global.h:156
@ G_FLAG_EVENT_SIMULATE
Definition: BKE_global.h:151
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET
Definition: BKE_global.h:158
@ G_FLAG_SCRIPT_AUTOEXEC
Definition: BKE_global.h:154

Don't overwrite these flags when reading a file.

Definition at line 162 of file BKE_global.h.

◆ G_MAIN

#define G_MAIN   (G).main

Stupid macro to hide the few valid usages of G.main (from startup/exit code e.g.), helps with cleanup task.

Definition at line 267 of file BKE_global.h.

Typedef Documentation

◆ Global

typedef struct Global Global

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Global.f

Enumerator
G_FLAG_RENDER_VIEWPORT 
G_FLAG_PICKSEL 
G_FLAG_EVENT_SIMULATE 

Support simulating events (for testing).

G_FLAG_USERPREF_NO_SAVE_ON_EXIT 
G_FLAG_SCRIPT_AUTOEXEC 
G_FLAG_SCRIPT_OVERRIDE_PREF 

When this flag is set ignore the prefs USER_SCRIPT_AUTOEXEC_DISABLE.

G_FLAG_SCRIPT_AUTOEXEC_FAIL 
G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET 

Definition at line 147 of file BKE_global.h.

◆ anonymous enum

anonymous enum

Global.debug

Enumerator
G_DEBUG 
G_DEBUG_FFMPEG 
G_DEBUG_PYTHON 
G_DEBUG_EVENTS 
G_DEBUG_HANDLERS 
G_DEBUG_WM 
G_DEBUG_JOBS 
G_DEBUG_FREESTYLE 
G_DEBUG_DEPSGRAPH_BUILD 
G_DEBUG_DEPSGRAPH_EVAL 
G_DEBUG_DEPSGRAPH_TAG 
G_DEBUG_DEPSGRAPH_TIME 
G_DEBUG_DEPSGRAPH_NO_THREADS 
G_DEBUG_DEPSGRAPH_PRETTY 
G_DEBUG_DEPSGRAPH_UUID 
G_DEBUG_DEPSGRAPH 
G_DEBUG_SIMDATA 
G_DEBUG_GPU 
G_DEBUG_IO 
G_DEBUG_GPU_FORCE_WORKAROUNDS 
G_DEBUG_XR 
G_DEBUG_XR_TIME 
G_DEBUG_GHOST 
G_DEBUG_WINTAB 

Definition at line 173 of file BKE_global.h.

◆ anonymous enum

anonymous enum

Global.fileflags

Enumerator
G_FILE_AUTOPACK 
G_FILE_COMPRESS 
G_FILE_NO_UI 
G_FILE_RECOVER_READ 

On read, use #FileGlobal.filename instead of the real location on-disk, needed for recovering temp files so relative paths resolve.

Note
In some ways it would be nicer to make this an argument passed to file loading. In practice this means recover needs to be passed around to too many low level functions, so keep this as a flag.
G_FILE_RECOVER_WRITE 

On write, assign use #FileGlobal.filename, otherwise leave it blank, needed so files can be recovered at their original locations.

Note
only BLENDER_QUIT_FILE and auto-save files include recovery information. As users/developers may not want their paths exposed in publicly distributed files.

Definition at line 208 of file BKE_global.h.

◆ anonymous enum

anonymous enum

Global.moving, signals drawing in (3d) window to denote transform

Enumerator
G_TRANSFORM_OBJ 
G_TRANSFORM_EDIT 
G_TRANSFORM_SEQ 
G_TRANSFORM_FCURVES 
G_TRANSFORM_WM 
G_TRANSFORM_CURSOR 

Set when transforming the cursor itself. Used as a hint to draw the cursor (even when hidden). Otherwise it's not possible to see what's being transformed.

Definition at line 246 of file BKE_global.h.

Variable Documentation

◆ G

Global G
extern

Defined in blender.c

Definition at line 51 of file blender.c.

Referenced by BKE_blender_free(), and BKE_blender_globals_init().