2023-05-31 16:19:06 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2012-02-17 19:59:41 +01:00
|
|
|
#pragma once
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2019-02-17 22:08:12 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup bke
|
|
|
|
* \section aboutglobal Global settings
|
2011-02-18 14:05:18 +01:00
|
|
|
* 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.
|
|
|
|
*/
|
2013-05-28 18:57:28 +02:00
|
|
|
|
2020-03-06 16:45:06 +01:00
|
|
|
#include "BLI_utildefines.h"
|
2002-10-12 13:37:38 +02:00
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct Main;
|
|
|
|
|
|
|
|
typedef struct Global {
|
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Data for the current active blend file.
|
|
|
|
*
|
|
|
|
* Note that `CTX_data_main(C)` should be used where possible.
|
|
|
|
* Otherwise access via #G_MAIN.
|
|
|
|
*/
|
2005-11-22 19:50:03 +01:00
|
|
|
struct Main *main;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2023-08-08 17:36:06 +02:00
|
|
|
/**
|
|
|
|
* Preview main is stored to avoid loading the preview file in multiple scenarios.
|
|
|
|
* It is actually shared between shader node previews and asset previews.
|
|
|
|
*/
|
|
|
|
struct Main *pr_main;
|
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/** Last saved location for images. */
|
|
|
|
char ima[1024]; /* 1024 = FILE_MAX */
|
|
|
|
/** Last used location for library link/append. */
|
|
|
|
char lib[1024];
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Strings of recently opened files to show in the file menu.
|
|
|
|
* A list of #RecentFile read from #BLENDER_HISTORY_FILE.
|
|
|
|
*/
|
2006-05-30 15:38:22 +02:00
|
|
|
struct ListBase recent_files;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Set when Escape been pressed or `Ctrl-C` pressed in background mode.
|
|
|
|
* Used for render quit and some other background tasks such as baking.
|
|
|
|
*/
|
2013-05-28 15:01:31 +02:00
|
|
|
bool is_break;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* 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).
|
|
|
|
*/
|
2013-05-28 15:01:31 +02:00
|
|
|
bool background;
|
2021-12-13 04:05:31 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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`.
|
|
|
|
*/
|
2013-05-28 15:01:31 +02:00
|
|
|
bool factory_startup;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Set when the user is interactively moving (transforming) content.
|
|
|
|
* see: #G_TRANSFORM_OBJ and related flags.
|
|
|
|
*/
|
2013-05-28 15:01:31 +02:00
|
|
|
short moving;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/** To indicate render is busy, prevent render-window events, animation playback etc. */
|
2014-02-03 08:55:59 +01:00
|
|
|
bool is_rendering;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
/**
|
|
|
|
* Debug value, can be set from the UI and python, used for testing nonstandard features.
|
2019-01-16 19:41:29 +01:00
|
|
|
* 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.
|
2021-12-13 04:05:31 +01:00
|
|
|
* Please document here the value(s) you are using (or a range of values reserved to some area):
|
2019-01-16 19:41:29 +01:00
|
|
|
* * -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).
|
2021-08-03 18:39:30 +02:00
|
|
|
* * 31: Enable the Select Debug Engine. Only available with #WITH_DRAW_DEBUG (08/2021).
|
2022-09-16 10:13:19 +02:00
|
|
|
* * 101: Enable UI debug drawing of full-screen area's corner widget (10/2014).
|
2022-05-20 06:30:17 +02:00
|
|
|
* * 102: Enable extra items in string search UI (05/2022).
|
2019-01-17 12:09:07 +01:00
|
|
|
* * 666: Use quicker batch delete for outliners' delete hierarchy (01/2019).
|
2019-01-16 19:41:29 +01:00
|
|
|
* * 777: Enable UI node panel's sockets polling (11/2011).
|
|
|
|
* * 799: Enable some mysterious new depsgraph behavior (05/2015).
|
2019-06-16 05:37:21 +02:00
|
|
|
* * 1112: Disable new Cloth internal springs handling (09/2014).
|
2019-01-16 19:41:29 +01:00
|
|
|
* * 1234: Disable new dyntopo code fixing skinny faces generation (04/2015).
|
2020-02-06 19:06:07 +01:00
|
|
|
* * 3001: Enable additional Fluid modifier (Mantaflow) options (02/2020).
|
2021-03-16 19:35:53 +01:00
|
|
|
* * 4000: Line Art state output and debugging logs (03/2021).
|
2022-01-10 23:45:53 +01:00
|
|
|
* * 4001: Mesh topology information in the spreadsheet (01/2022).
|
2019-01-16 19:41:29 +01:00
|
|
|
* * 16384 and above: Reserved for python (add-ons) usage.
|
|
|
|
*/
|
2012-08-08 20:21:54 +02:00
|
|
|
short debug_value;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2002-10-12 13:37:38 +02:00
|
|
|
int f;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-03-29 20:38:32 +02:00
|
|
|
struct {
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Logging vars (different loggers may use).
|
|
|
|
* Set via `--log-level` command line argument.
|
|
|
|
*/
|
2018-03-29 20:38:32 +02:00
|
|
|
int level;
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* FILE handle or use `stderr` (we own this so close when done).
|
|
|
|
* Set via `--log-file` command line argument.
|
|
|
|
*/
|
2018-03-29 20:38:32 +02:00
|
|
|
void *file;
|
|
|
|
} log;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Debug flag, #G_DEBUG, #G_DEBUG_PYTHON & friends, set via:
|
|
|
|
* - Command line arguments: `--debug`, `--debug-memory` ... etc.
|
|
|
|
* - Python API: `bpy.app.debug`, `bpy.app.debug_memory` ... etc.
|
|
|
|
*/
|
2012-03-31 02:59:17 +02:00
|
|
|
int debug;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
Geometry: add utility to check for bad geometry element index dependence
Sometimes .blend files have compatibility issues between Blender versions,
because .blend files depended on the specific order of geometry elements
generated by some nodes/modifiers (#112746, #113018). While we make
guarantees about the order in some places, that is relatively rare, because it
makes future improvements much harder. The functionality in this patch
makes it easier for users to notice when they depend on things that are not
expected to be stable between Blender builds.
This is achieved by adding a new global flag which indicates whether some
algorithms should randomize their output. The functionality can be toggled
on or off by searching for `Set Geometry Randomization`. If there are no
differences (or acceptable minor ones) when the flag is on or off, one can
be reasonably sure that one does not on unspecified behavior (can't be 100%
sure though, because randomization might be missing in some places). If
there are big differences, one should consider fixing the file before it comes
to an actual breakage in the next Blender version.
Currently, the setting is only available when `Developer Extras` is turned on,
because the setting is in no menu.
With this patch, if we get bug reports with compatibility issues caused by
depending on indices, one of the following three cases should always apply:
* We actually accidentally broke something, which requires a fix commit.
* Turning on geometry randomization shows that the .blend file depends on
things it shouldn't depend on. In this case the user has to fix the file.
* We are missing geometry randomization somewhere, which requires a fix
commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/113030
2023-09-29 21:44:36 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
bool randomize_geometry_element_order;
|
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* Control behavior of file reading/writing.
|
|
|
|
*
|
|
|
|
* This variable is written to / read from #FileGlobal.fileflags.
|
|
|
|
* See: #G_FILE_COMPRESS and related flags.
|
|
|
|
*/
|
2005-11-22 19:50:03 +01:00
|
|
|
int fileflags;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-12-13 04:05:31 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2013-06-10 02:42:16 +02:00
|
|
|
char autoexec_fail[200];
|
2023-01-19 08:18:27 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Has there been an opengl deprecation call detected when running on a none OpenGL backend.
|
|
|
|
*/
|
|
|
|
bool opengl_deprecation_usage_detected;
|
|
|
|
const char *opengl_deprecation_usage_filename;
|
|
|
|
int opengl_deprecation_usage_lineno;
|
2002-10-12 13:37:38 +02:00
|
|
|
} Global;
|
|
|
|
|
|
|
|
/* **************** GLOBAL ********************* */
|
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
/** #Global.f */
|
2019-02-02 03:29:52 +01:00
|
|
|
enum {
|
2019-02-02 03:39:51 +01:00
|
|
|
G_FLAG_RENDER_VIEWPORT = (1 << 0),
|
2019-02-02 04:45:42 +01:00
|
|
|
G_FLAG_PICKSEL = (1 << 2),
|
2019-02-02 05:14:51 +01:00
|
|
|
/** Support simulating events (for testing). */
|
|
|
|
G_FLAG_EVENT_SIMULATE = (1 << 3),
|
2019-05-14 04:23:55 +02:00
|
|
|
G_FLAG_USERPREF_NO_SAVE_ON_EXIT = (1 << 4),
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-02-02 03:39:51 +01:00
|
|
|
G_FLAG_SCRIPT_AUTOEXEC = (1 << 13),
|
2023-07-15 07:45:06 +02:00
|
|
|
/** When this flag is set ignore the preferences #USER_SCRIPT_AUTOEXEC_DISABLE. */
|
2019-02-02 03:39:51 +01:00
|
|
|
G_FLAG_SCRIPT_OVERRIDE_PREF = (1 << 14),
|
|
|
|
G_FLAG_SCRIPT_AUTOEXEC_FAIL = (1 << 15),
|
|
|
|
G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET = (1 << 16),
|
2019-02-02 03:29:52 +01:00
|
|
|
};
|
Visual Keying refactor
This code was always kludgy and this clean it up a bit.
insertmatrixkey() has been properly renamed insertkey_float().
Matrix calculations have been excised from the interface code,
and placed in insertmatrixkey(), so that you can call it from
anywhere without preliminaries and the proper values are calced
based on the passed adr code.
By much request, several semi-bug reports and discussion with
production animators, visual keying is now used automatic
for objects and bones that have constraints that cause them
to ignore their Ipos (CopyLoc, TrackTo, etc.). In those cases,
visual keying is used instead of the normal Ipo insertion
method. This "auto" functionality is toggled from the
"Use Visual Keying" button found along with "Needed" and
"Available" in the Edit Methods prefs.
Logic as to which constraints trigger visual keying on
which adrcodes can be tweaked in match_adr_constraint()
src/editipo.c
This has been tested by a couple of people, myself included,
but I may not have hit every constraint case, so evolutionary
feedback is welcome.
2007-07-31 15:37:59 +02:00
|
|
|
|
2019-02-02 04:01:48 +01:00
|
|
|
/** Don't overwrite these flags when reading a file. */
|
|
|
|
#define G_FLAG_ALL_RUNTIME \
|
2019-05-14 04:23:55 +02:00
|
|
|
(G_FLAG_SCRIPT_AUTOEXEC | G_FLAG_SCRIPT_OVERRIDE_PREF | G_FLAG_EVENT_SIMULATE | \
|
2021-09-16 08:52:28 +02:00
|
|
|
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)
|
2019-02-02 04:01:48 +01:00
|
|
|
|
2019-02-02 04:45:42 +01:00
|
|
|
/** Flags to read from blend file. */
|
|
|
|
#define G_FLAG_ALL_READFILE 0
|
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
/** #Global.debug */
|
2012-03-31 02:59:17 +02:00
|
|
|
enum {
|
2018-10-17 16:42:18 +02:00
|
|
|
G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */
|
2012-03-31 02:59:17 +02:00
|
|
|
G_DEBUG_FFMPEG = (1 << 1),
|
2018-10-17 16:42:18 +02:00
|
|
|
G_DEBUG_PYTHON = (1 << 2), /* extra python info */
|
|
|
|
G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */
|
|
|
|
G_DEBUG_HANDLERS = (1 << 4), /* events handling */
|
|
|
|
G_DEBUG_WM = (1 << 5), /* operator, undo */
|
|
|
|
G_DEBUG_JOBS = (1 << 6), /* jobs time profiling */
|
|
|
|
G_DEBUG_FREESTYLE = (1 << 7), /* freestyle messages */
|
2018-02-21 10:44:36 +01:00
|
|
|
G_DEBUG_DEPSGRAPH_BUILD = (1 << 8), /* depsgraph construction messages */
|
|
|
|
G_DEBUG_DEPSGRAPH_EVAL = (1 << 9), /* depsgraph evaluation messages */
|
|
|
|
G_DEBUG_DEPSGRAPH_TAG = (1 << 10), /* depsgraph tagging messages */
|
2018-03-12 17:03:54 +01:00
|
|
|
G_DEBUG_DEPSGRAPH_TIME = (1 << 11), /* depsgraph timing statistics and messages */
|
2018-03-12 17:01:02 +01:00
|
|
|
G_DEBUG_DEPSGRAPH_NO_THREADS = (1 << 12), /* single threaded depsgraph */
|
2018-03-16 12:24:08 +01:00
|
|
|
G_DEBUG_DEPSGRAPH_PRETTY = (1 << 13), /* use pretty colors in depsgraph messages */
|
2021-08-09 12:05:11 +02:00
|
|
|
G_DEBUG_DEPSGRAPH_UUID = (1 << 14), /* Verify validness of session-wide identifiers
|
|
|
|
* assigned to ID datablocks */
|
2018-03-12 17:01:02 +01:00
|
|
|
G_DEBUG_DEPSGRAPH = (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_EVAL | G_DEBUG_DEPSGRAPH_TAG |
|
2020-07-30 12:29:19 +02:00
|
|
|
G_DEBUG_DEPSGRAPH_TIME | G_DEBUG_DEPSGRAPH_UUID),
|
2023-09-19 14:22:32 +02:00
|
|
|
G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */
|
|
|
|
G_DEBUG_GPU = (1 << 16), /* gpu debug */
|
|
|
|
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */
|
|
|
|
G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */
|
|
|
|
G_DEBUG_GPU_RENDERDOC = (1 << 19), /* Enable RenderDoc integration. */
|
|
|
|
G_DEBUG_XR = (1 << 20), /* XR/OpenXR messages */
|
|
|
|
G_DEBUG_XR_TIME = (1 << 21), /* XR/OpenXR timing messages */
|
|
|
|
|
|
|
|
G_DEBUG_GHOST = (1 << 22), /* Debug GHOST module. */
|
|
|
|
G_DEBUG_WINTAB = (1 << 23), /* Debug Wintab. */
|
2012-03-31 02:59:17 +02:00
|
|
|
};
|
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
#define G_DEBUG_ALL \
|
|
|
|
(G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \
|
2021-06-23 02:30:10 +02:00
|
|
|
G_DEBUG_FREESTYLE | G_DEBUG_DEPSGRAPH | G_DEBUG_IO | G_DEBUG_GHOST | G_DEBUG_WINTAB)
|
2012-03-31 02:59:17 +02:00
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
/** #Global.fileflags */
|
2019-02-02 03:29:52 +01:00
|
|
|
enum {
|
2019-02-02 03:39:51 +01:00
|
|
|
G_FILE_AUTOPACK = (1 << 0),
|
2019-02-02 03:29:52 +01:00
|
|
|
G_FILE_COMPRESS = (1 << 1),
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-06-19 07:41:07 +02:00
|
|
|
// G_FILE_DEPRECATED_9 = (1 << 9),
|
2019-02-02 03:29:52 +01:00
|
|
|
G_FILE_NO_UI = (1 << 10),
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-02-02 03:29:52 +01:00
|
|
|
/* Bits 11 to 22 (inclusive) are deprecated & need to be cleared */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-03-15 01:27:37 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2021-03-15 03:30:26 +01:00
|
|
|
G_FILE_RECOVER_READ = (1 << 23),
|
2021-03-15 03:30:43 +01:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
G_FILE_RECOVER_WRITE = (1 << 24),
|
2019-02-02 03:29:52 +01:00
|
|
|
/** BMesh option to save as older mesh format */
|
2019-01-31 06:22:25 +01:00
|
|
|
/* #define G_FILE_MESH_COMPAT (1 << 26) */
|
2019-01-26 06:50:13 +01:00
|
|
|
/* #define G_FILE_GLSL_NO_ENV_LIGHTING (1 << 28) */ /* deprecated */
|
2019-02-02 03:29:52 +01:00
|
|
|
};
|
2012-11-07 05:13:03 +01:00
|
|
|
|
2020-06-18 04:56:46 +02:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2021-03-15 03:30:43 +01:00
|
|
|
#define G_FILE_FLAG_ALL_RUNTIME (G_FILE_NO_UI | G_FILE_RECOVER_READ | G_FILE_RECOVER_WRITE)
|
2002-10-12 13:37:38 +02:00
|
|
|
|
2019-01-31 06:22:25 +01:00
|
|
|
/** #Global.moving, signals drawing in (3d) window to denote transform */
|
2019-02-02 03:29:52 +01:00
|
|
|
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),
|
2021-11-02 09:35:17 +01:00
|
|
|
/**
|
2021-11-08 06:20:29 +01:00
|
|
|
* Set when transforming the cursor itself.
|
2021-11-02 09:35:17 +01:00
|
|
|
* Used as a hint to draw the cursor (even when hidden).
|
2021-11-19 12:44:27 +01:00
|
|
|
* Otherwise it's not possible to see what's being transformed.
|
2021-11-02 09:35:17 +01:00
|
|
|
*/
|
|
|
|
G_TRANSFORM_CURSOR = (1 << 5),
|
2019-02-02 03:29:52 +01:00
|
|
|
};
|
2005-03-19 21:27:13 +01:00
|
|
|
|
2023-07-31 03:50:54 +02:00
|
|
|
/** Defined in `blender.cc` */
|
2002-10-12 13:37:38 +02:00
|
|
|
extern Global G;
|
|
|
|
|
2018-06-11 12:14:18 +02:00
|
|
|
/**
|
2019-01-31 06:22:25 +01:00
|
|
|
* Stupid macro to hide the few *valid* usages of `G.main` (from startup/exit code e.g.),
|
|
|
|
* helps with cleanup task.
|
2018-06-11 12:14:18 +02:00
|
|
|
*/
|
|
|
|
#define G_MAIN (G).main
|
|
|
|
|
2002-10-12 13:37:38 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|