|
Blender V5.3
|
#include <BKE_global.hh>
Classes | |
| struct | [struct].log |
Public Attributes | |
| Main * | main = nullptr |
| Main * | pr_main = nullptr |
| char | filepath_last_image [1024] = "" |
| char | filepath_last_library [1024] = "" |
| char | filepath_last_blend [1024] = "" |
| ListBaseT< RecentFile > | recent_files = {} |
| bool | is_break = false |
| bool | background = false |
| bool | factory_startup = false |
| short | moving = 0 |
| bool | is_rendering = false |
| short | debug_value = 0 |
| int | f = 0 |
| std::optional< bool > | autoexec_override |
| struct | log |
| uint64_t | debug = 0 |
| bool | randomize_geometry_element_order = false |
| int | fileflags = 0 |
| char | autoexec_fail [200] = "" |
| char | gpu_debug_scope_name [100] = "" |
| char | gpu_debug_shader_source_name [100] = "" |
| bool | profile_gpu = false |
Global data, typically accessed from G. See: BKE_blender_globals_init & BKE_blender_globals_clear.
Definition at line 30 of file BKE_global.hh.
| char blender::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 180 of file BKE_global.hh.
| std::optional<bool> blender::Global::autoexec_override |
Command line override for the USER_SCRIPT_AUTOEXEC_DISABLE preference, set for the whole session.
The user may opt in or out when opening a file interactively, files opened afterwards still default to this value.
Definition at line 133 of file BKE_global.hh.
| bool blender::Global::background = false |
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 76 of file BKE_global.hh.
| uint64_t blender::Global::debug = 0 |
Debug flag, G_DEBUG, G_DEBUG_PYTHON & friends, set via:
Definition at line 153 of file BKE_global.hh.
Referenced by Freestyle::ViewMapBuilder::BuildGrid(), Freestyle::computeCumulativeVisibility(), Freestyle::computeDetailedVisibility(), Freestyle::ViewMapBuilder::ComputeEdgesVisibility(), Freestyle::computeFastVisibility(), Freestyle::ViewMapBuilder::ComputeIntersections(), Freestyle::ViewMapBuilder::ComputeRayCastingVisibility(), Freestyle::ViewMapBuilder::ComputeRayCastingVisibility(), Freestyle::ViewMapBuilder::ComputeSweepLineIntersections(), Freestyle::computeVeryFastVisibility(), Freestyle::computeVisibility(), Freestyle::ViewMapBuilder::CullViewEdges(), and Freestyle::findOccludee().
| short blender::Global::debug_value = 0 |
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):
Definition at line 116 of file BKE_global.hh.
| int blender::Global::f = 0 |
Saved to the blend file as #FileGlobal.globalf
Definition at line 124 of file BKE_global.hh.
| bool blender::Global::factory_startup = false |
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 83 of file BKE_global.hh.
| int blender::Global::fileflags = 0 |
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 170 of file BKE_global.hh.
| char blender::Global::filepath_last_blend[1024] = "" |
Last saved location for .blend files. This is used for recovery in case of a crash. It is set when a .blend file is loaded or when saving (manually or through autosave).
Definition at line 55 of file BKE_global.hh.
| char blender::Global::filepath_last_image[1024] = "" |
Last saved location for images.
Definition at line 47 of file BKE_global.hh.
| char blender::Global::filepath_last_library[1024] = "" |
Last used location for library link/append.
Definition at line 49 of file BKE_global.hh.
| char blender::Global::gpu_debug_scope_name[100] = "" |
Triggers a GPU capture if the name matches a DebugScope. Set using --debug-gpu-scope-capture "debug_scope".
Definition at line 186 of file BKE_global.hh.
| char blender::Global::gpu_debug_shader_source_name[100] = "" |
Save final shader string to disk. Set using --debug-gpu-shader-source "shader_name".
Definition at line 192 of file BKE_global.hh.
| bool blender::Global::is_break = false |
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 67 of file BKE_global.hh.
| bool blender::Global::is_rendering = false |
To indicate render is busy, prevent render-window events, animation playback etc.
Definition at line 92 of file BKE_global.hh.
| struct blender::Global::[struct].log blender::Global::log |
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 38 of file BKE_global.hh.
| short blender::Global::moving = 0 |
Set when the user is interactively moving (transforming) content. see: G_TRANSFORM_OBJ and related flags.
Definition at line 89 of file BKE_global.hh.
Referenced by region_view3d_navigating_or_transforming().
Preview main is stored to avoid loading the preview file in multiple scenarios. It is actually shared between shader node previews and asset previews.
Definition at line 44 of file BKE_global.hh.
| bool blender::Global::profile_gpu = false |
Definition at line 194 of file BKE_global.hh.
| bool blender::Global::randomize_geometry_element_order = false |
When true, various geometry processing algorithms randomize the order of elements (e.g. vertices or edges) in the output. In many cases, we don't make guarantees about the exact order of elements. So if users depend on the indices with e.g. geometry nodes, their file can break in a different Blender version. Explicitly turning on randomization can help protect oneself against such breakages.
Definition at line 162 of file BKE_global.hh.
| ListBaseT<RecentFile> blender::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 61 of file BKE_global.hh.