62 #include "../generic/py_capi_utils.h"
63 #include "../generic/python_utildefines.h"
84 {
"version",
"The Blender version as a tuple of 3 numbers. eg. (2, 83, 1)"},
85 {
"version_file",
"The blend file version, compatible with ``bpy.data.version``"},
86 {
"version_string",
"The Blender version formatted as a string"},
87 {
"version_cycle",
"The release status of this build alpha/beta/rc/release"},
88 {
"version_char",
"Deprecated, always an empty string"},
90 "The location of Blender's executable, useful for utilities that open new instances"},
92 "Boolean, True when blender is running without a user interface (started with -b)"},
93 {
"factory_startup",
"Boolean, True when blender is running with --factory-startup)"},
96 {
"build_date",
"The date this blender instance was built"},
97 {
"build_time",
"The time this blender instance was built"},
98 {
"build_commit_timestamp",
"The unix timestamp of commit this blender instance was built"},
99 {
"build_commit_date",
"The date of commit this blender instance was built"},
100 {
"build_commit_time",
"The time of commit this blender instance was built"},
101 {
"build_hash",
"The commit hash this blender instance was built with"},
102 {
"build_branch",
"The branch this blender instance was built from"},
103 {
"build_platform",
"The platform this blender instance was built for"},
104 {
"build_type",
"The type of build (Release, Debug)"},
105 {
"build_cflags",
"C compiler flags"},
106 {
"build_cxxflags",
"C++ compiler flags"},
107 {
"build_linkflags",
"Binary linking flags"},
108 {
"build_system",
"Build system used"},
111 {
"alembic",
"Alembic library information backend"},
112 {
"usd",
"USD library information backend"},
113 {
"ffmpeg",
"FFmpeg library information backend"},
114 {
"ocio",
"OpenColorIO library information backend"},
115 {
"oiio",
"OpenImageIO library information backend"},
116 {
"opensubdiv",
"OpenSubdiv library information backend"},
117 {
"openvdb",
"OpenVDB library information backend"},
118 {
"sdl",
"SDL library information backend"},
119 {
"build_options",
"A set containing most important enabled optional build features"},
120 {
"handlers",
"Application handler callbacks"},
121 {
"translations",
"Application and addons internationalization API"},
124 {
"icons",
"Manage custom icons"},
125 {
"timers",
"Manage timers"},
130 "This module contains application values that remain unchanged during runtime.");
145 if (app_info ==
NULL) {
148 #define SetIntItem(flag) PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
149 #define SetStrItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
150 #define SetBytesItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyBytes_FromString(str))
151 #define SetObjItem(obj) PyStructSequence_SET_ITEM(app_info, pos++, obj)
218 if (PyErr_Occurred()) {
230 "Boolean, for debug info (started with --debug / --debug_* matching this attribute name)");
234 return PyBool_FromLong(
G.debug & flag);
240 const int param = PyObject_IsTrue(value);
243 PyErr_SetString(PyExc_TypeError,
"bpy.app.debug can only be True/False");
258 bpy_app_global_flag_doc,
259 "Boolean, for application behavior (started with --enable-* matching this attribute name)");
263 return PyBool_FromLong(
G.f & flag);
269 const int param = PyObject_IsTrue(value);
272 PyErr_SetString(PyExc_TypeError,
"bpy.app.use_* can only be True/False");
290 const int param = PyObject_IsTrue(value);
292 PyErr_SetString(PyExc_ValueError,
"This bpy.app.use_* option can only be disabled");
299 "String, the path to the python executable (read-only). "
300 "Deprecated! Use ``sys.executable`` instead.");
303 PyErr_Warn(PyExc_RuntimeWarning,
"Use 'sys.executable' instead of 'binary_path_python'!");
304 return Py_INCREF_RET(PySys_GetObject(
"executable"));
308 "Short, number which can be set to non-zero values for testing purposes");
311 return PyLong_FromLong(
G.debug_value);
318 if (param == -1 && PyErr_Occurred()) {
320 "bpy.app.debug_value can only be set to a whole number");
324 G.debug_value = param;
331 PyDoc_STRVAR(bpy_app_tempdir_doc,
"String, the temp directory used by blender (read-only)");
338 bpy_app_driver_dict_doc,
339 "Dictionary for drivers namespace, editable in-place, reset on file load (read-only)");
344 PyErr_SetString(PyExc_RuntimeError,
"bpy.app.driver_namespace failed to create dictionary");
353 "Reference size for icon/preview renders (read-only)");
397 {
"debug_depsgraph_build",
402 {
"debug_depsgraph_eval",
407 {
"debug_depsgraph_tag",
412 {
"debug_depsgraph_time",
417 {
"debug_depsgraph_pretty",
429 {
"use_event_simulate",
432 bpy_app_global_flag_doc,
435 {
"use_userpref_skip_save_on_exit",
438 bpy_app_global_flag_doc,
441 {
"binary_path_python",
444 bpy_app_binary_path_python_doc,
450 bpy_app_debug_value_doc,
458 bpy_app_preview_render_size_doc,
460 {
"render_preview_size",
463 bpy_app_preview_render_size_doc,
468 {
"autoexec_fail_quiet",
const char * BKE_appdir_program_path(void)
#define BLENDER_VERSION_PATCH
#define BLENDER_VERSION_CYCLE
#define BLENDER_FILE_SUBVERSION
#define BLENDER_FILE_VERSION
const char * BKE_blender_version_string(void)
@ G_DEBUG_DEPSGRAPH_PRETTY
@ G_DEBUG_DEPSGRAPH_BUILD
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET
@ G_FLAG_USERPREF_NO_SAVE_ON_EXIT
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL
#define POINTER_AS_INT(i)
ID and Library types, which are fundamental for sdna.
int UI_icon_preview_to_render_size(enum eIconSizes size)
static void py_struct_seq_getset_init(void)
static PyStructSequence_Field app_info_fields[]
static PyObject * make_app_info(void)
static PyObject * bpy_app_global_flag_get(PyObject *UNUSED(self), void *closure)
static PyObject * bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(closure))
static PyObject * bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure))
#define SetBytesItem(str)
static PyGetSetDef bpy_app_getsets[]
static PyObject * bpy_app_debug_value_get(PyObject *UNUSED(self), void *UNUSED(closure))
static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *closure)
static int bpy_app_global_flag_set__only_disable(PyObject *UNUSED(self), PyObject *value, void *closure)
static PyObject * bpy_app_preview_render_size_get(PyObject *UNUSED(self), void *closure)
static PyObject * bpy_app_debug_get(PyObject *UNUSED(self), void *closure)
static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure))
PyDoc_STRVAR(bpy_app_doc, "This module contains application values that remain unchanged during runtime.")
PyObject * BPY_app_struct(void)
static PyObject * bpy_app_binary_path_python_get(PyObject *UNUSED(self), void *UNUSED(closure))
ulong build_commit_timestamp
static PyStructSequence_Desc app_info_desc
static int bpy_app_global_flag_set(PyObject *UNUSED(self), PyObject *value, void *closure)
static PyTypeObject BlenderAppType
static PyObject * bpy_app_autoexec_fail_message_get(PyObject *UNUSED(self), void *UNUSED(closure))
PyObject * BPY_app_alembic_struct(void)
PyObject * BPY_app_build_options_struct(void)
PyObject * BPY_app_ffmpeg_struct(void)
PyObject * BPY_app_handlers_struct(void)
PyObject * BPY_app_icons_module(void)
PyObject * BPY_app_ocio_struct(void)
PyObject * BPY_app_oiio_struct(void)
PyObject * BPY_app_opensubdiv_struct(void)
PyObject * BPY_app_openvdb_struct(void)
PyObject * BPY_app_sdl_struct(void)
PyObject * BPY_app_timers_module(void)
PyObject * BPY_app_translations_struct(void)
PyObject * BPY_app_usd_struct(void)
PyObject * bpy_pydriver_Dict
int bpy_pydriver_create_dict(void)
void * BKE_tempdir_session
int16_t PyC_Long_AsI16(PyObject *value)
PyObject * PyC_Err_SetString_Prefix(PyObject *exception_type_prefix, const char *str)
PyObject * PyC_UnicodeFromByte(const char *str)
#define PyC_Tuple_Pack_I32(...)
void WM_main_add_notifier(unsigned int type, void *reference)