Blender  V3.3
Public Attributes | List of all members
Global Struct Reference

#include <BKE_global.h>

Public Attributes

struct Mainmain
 
char ima [1024]
 
char lib [1024]
 
struct ListBase recent_files
 
bool is_break
 
bool background
 
bool factory_startup
 
short moving
 
bool is_rendering
 
short debug_value
 
int f
 
struct {
   int   level
 
   void *   file
 
log
 
int debug
 
int fileflags
 
char autoexec_fail [200]
 

Detailed Description

Definition at line 22 of file BKE_global.h.

Member Data Documentation

◆ autoexec_fail

char Global::autoexec_fail[200]

Message to show when loading a .blend file attempts to execute a Python script or driver-expression when doing so is disallowed.

Set when (G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL) == 0, so users can be alerted to the reason why the file may not be behaving as expected. Typically Python drivers.

Definition at line 141 of file BKE_global.h.

◆ background

bool Global::background

Blender is running without any Windows or OpenGLES context. Typically set by the --background command-line argument.

Also enabled when build defines WITH_PYTHON_MODULE or WITH_HEADLESS are set (which use background mode by definition).

Definition at line 56 of file BKE_global.h.

◆ debug

int Global::debug

◆ debug_value

short Global::debug_value

Debug value, can be set from the UI and python, used for testing nonstandard features. DO NOT abuse it with generic checks like if (G.debug_value > 0). Do not use it as bitflags. Only precise specific values should be checked for, to avoid unpredictable side-effects. Please document here the value(s) you are using (or a range of values reserved to some area):

  • -16384 and below: Reserved for python (add-ons) usage.
  • -1: Disable faster motion paths computation (since 08/2018).
  • 1 - 30: EEVEE debug/stats values (01/2018).
  • 31: Enable the Select Debug Engine. Only available with #WITH_DRAW_DEBUG (08/2021).
  • 101: Enable UI debug drawing of fullscreen area's corner widget (10/2014).
  • 102: Enable extra items in string search UI (05/2022).
  • 666: Use quicker batch delete for outliners' delete hierarchy (01/2019).
  • 777: Enable UI node panel's sockets polling (11/2011).
  • 799: Enable some mysterious new depsgraph behavior (05/2015).
  • 1112: Disable new Cloth internal springs handling (09/2014).
  • 1234: Disable new dyntopo code fixing skinny faces generation (04/2015).
  • 3001: Enable additional Fluid modifier (Mantaflow) options (02/2020).
  • 4000: Line Art state output and debugging logs (03/2021).
  • 4001: Mesh topology information in the spreadsheet (01/2022).
  • 16384 and above: Reserved for python (add-ons) usage.

Definition at line 95 of file BKE_global.h.

◆ f

int Global::f

Saved to the blend file as FileGlobal.globalf

Note
Currently this is only used for runtime options, adding flags to G_FLAG_ALL_READFILE will cause them to be written and read to files.

Definition at line 103 of file BKE_global.h.

Referenced by BKE_blender_globals_init().

◆ factory_startup

bool Global::factory_startup

Skip reading the startup file and user preferences. Also disable saving the preferences on exit (see G_FLAG_USERPREF_NO_SAVE_ON_EXIT), see via the command line argument: --factory-startup.

Definition at line 63 of file BKE_global.h.

◆ file

void* Global::file

FILE handle or use stderr (we own this so close when done). Set via --log-file command line argument.

Definition at line 115 of file BKE_global.h.

Referenced by BKE_blender_free().

◆ fileflags

int Global::fileflags

Control behavior of file reading/writing.

This variable is written to / read from FileGlobal.fileflags. See: G_FILE_COMPRESS and related flags.

Definition at line 131 of file BKE_global.h.

◆ ima

char Global::ima[1024]

Last saved location for images.

Definition at line 33 of file BKE_global.h.

Referenced by BKE_blender_globals_init().

◆ is_break

bool Global::is_break

Set when Escape been pressed or Ctrl-C pressed in background mode. Used for render quit and some other background tasks such as baking.

Definition at line 47 of file BKE_global.h.

◆ is_rendering

bool Global::is_rendering

To indicate render is busy, prevent render-window events, animation playback etc.

Definition at line 72 of file BKE_global.h.

◆ level

int Global::level

Logging vars (different loggers may use). Set via --log-level command line argument.

Definition at line 110 of file BKE_global.h.

Referenced by BKE_blender_globals_init().

◆ lib

char Global::lib[1024]

Last used location for library link/append.

Definition at line 35 of file BKE_global.h.

◆ 

struct { ... } Global::log

◆ main

struct Main* Global::main

Data for the current active blend file.

Note that CTX_data_main(C) should be used where possible. Otherwise access via G_MAIN.

Definition at line 30 of file BKE_global.h.

◆ moving

short Global::moving

Set when the user is interactively moving (transforming) content. see: G_TRANSFORM_OBJ and related flags.

Definition at line 69 of file BKE_global.h.

◆ recent_files

struct ListBase Global::recent_files

Strings of recently opened files to show in the file menu. A list of RecentFile read from BLENDER_HISTORY_FILE.

Definition at line 35 of file BKE_global.h.


The documentation for this struct was generated from the following file: