Blender V4.5
bpy_app.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12
13#include <Python.h>
14
15#include "bpy_app.hh"
16
17#include "bpy_app_alembic.hh"
19#include "bpy_app_ffmpeg.hh"
20#include "bpy_app_ocio.hh"
21#include "bpy_app_oiio.hh"
22#include "bpy_app_opensubdiv.hh"
23#include "bpy_app_openvdb.hh"
24#include "bpy_app_sdl.hh"
25#include "bpy_app_usd.hh"
26
28
29#include "bpy_app_handlers.hh"
30#include "bpy_driver.hh"
31
32#include "BPY_extern_python.hh" /* For #BPY_python_app_help_text_fn. */
33
34/* modules */
35#include "bpy_app_icons.hh"
36#include "bpy_app_timers.hh"
37
38#include "BLI_utildefines.h"
39
40#include "BKE_appdir.hh"
41#include "BKE_blender_version.h"
42#include "BKE_global.hh"
43#include "BKE_main.hh"
44
45#include "UI_interface_icons.hh"
46
47#include "MEM_guardedalloc.h"
48
49#include "RNA_enum_types.hh" /* For `rna_enum_wm_job_type_items`. */
50
51/* for notifiers */
52#include "WM_api.hh"
53#include "WM_types.hh"
54
57#include "../generic/python_compat.hh" /* IWYU pragma: keep. */
58
59#ifdef BUILD_DATE
60extern "C" char build_date[];
61extern "C" char build_time[];
63extern "C" char build_commit_date[];
64extern "C" char build_commit_time[];
65extern "C" char build_hash[];
66extern "C" char build_branch[];
67extern "C" char build_platform[];
68extern "C" char build_type[];
69extern "C" char build_cflags[];
70extern "C" char build_cxxflags[];
71extern "C" char build_linkflags[];
72extern "C" char build_system[];
73#endif
74
75static PyTypeObject BlenderAppType;
76
77static PyStructSequence_Field app_info_fields[] = {
78 {"version",
79 "The Blender version as a tuple of 3 numbers (major, minor, micro). eg. (4, 3, 1)"},
80 {"version_file",
81 "The Blender File version, as a tuple of 3 numbers (major, minor, file sub-version), that "
82 "will be used to save a .blend file. The last item in this tuple indicates the file "
83 "sub-version, which is different from the release micro version (the last item of the "
84 "`bpy.app.version` tuple). The file sub-version can be incremented multiple times while a "
85 "Blender version is under development. This value is, and should be, used for handling "
86 "compatibility changes between Blender versions"},
87 {"version_string", "The Blender version formatted as a string"},
88 {"version_cycle", "The release status of this build alpha/beta/rc/release"},
89 {"background",
90 "Boolean, True when blender is running without a user interface (started with -b)"},
91 {"module", "Boolean, True when running Blender as a python module"},
92 {"factory_startup", "Boolean, True when blender is running with --factory-startup)"},
93 {"portable", "Boolean, True unless blender was built to reference absolute paths (on UNIX)."},
94
95 /* buildinfo */
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"},
109
110 /* submodules */
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"},
122
123 /* Modules (not struct sequence). */
124 {"icons", "Manage custom icons"},
125 {"timers", "Manage timers"},
126 {nullptr},
127};
128
130 /* Wrap. */
131 bpy_app_doc,
132 "This module contains application values that remain unchanged during runtime.");
133
134static PyStructSequence_Desc app_info_desc = {
135 /*name*/ "bpy.app",
136 /*doc*/ bpy_app_doc,
137 /*fields*/ app_info_fields,
138 /*n_in_sequence*/ ARRAY_SIZE(app_info_fields) - 1,
139};
140
141static PyObject *make_app_info()
142{
143 PyObject *app_info;
144 int pos = 0;
145
146 app_info = PyStructSequence_New(&BlenderAppType);
147 if (app_info == nullptr) {
148 return nullptr;
149 }
150#define SetIntItem(flag) PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
151#define SetStrItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
152#define SetBytesItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyBytes_FromString(str))
153#define SetObjItem(obj) PyStructSequence_SET_ITEM(app_info, pos++, obj)
154
160
162 SetObjItem(PyBool_FromLong(G.background));
163#ifdef WITH_PYTHON_MODULE
164 SetObjItem(Py_NewRef(Py_True));
165#else
166 SetObjItem(Py_NewRef(Py_False));
167#endif
168 SetObjItem(PyBool_FromLong(G.factory_startup));
169
170#ifdef WITH_INSTALL_PORTABLE
171 SetObjItem(Py_NewRef(Py_True));
172#else
173 SetObjItem(Py_NewRef(Py_False));
174#endif
175
176/* build info, use bytes since we can't assume _any_ encoding:
177 * see patch #30154 for issue */
178#ifdef BUILD_DATE
192#else
193 SetBytesItem("Unknown");
194 SetBytesItem("Unknown");
195 SetIntItem(0);
196 SetBytesItem("Unknown");
197 SetBytesItem("Unknown");
198 SetBytesItem("Unknown");
199 SetBytesItem("Unknown");
200 SetBytesItem("Unknown");
201 SetBytesItem("Unknown");
202 SetBytesItem("Unknown");
203 SetBytesItem("Unknown");
204 SetBytesItem("Unknown");
205 SetBytesItem("Unknown");
206#endif
207
219
220 /* modules */
223
224#undef SetIntItem
225#undef SetStrItem
226#undef SetBytesItem
227#undef SetObjItem
228
229 if (PyErr_Occurred()) {
230 Py_DECREF(app_info);
231 return nullptr;
232 }
233 return app_info;
234}
235
236/* a few getsets because it makes sense for them to be in bpy.app even though
237 * they are not static */
238
240 /* Wrap. */
241 bpy_app_debug_doc,
242 "Boolean, for debug info "
243 "(started with ``--debug`` / ``--debug-*`` matching this attribute name)");
244static PyObject *bpy_app_debug_get(PyObject * /*self*/, void *closure)
245{
246 const int flag = POINTER_AS_INT(closure);
247 return PyBool_FromLong(G.debug & flag);
248}
249
250static int bpy_app_debug_set(PyObject * /*self*/, PyObject *value, void *closure)
251{
252 const int flag = POINTER_AS_INT(closure);
253 const int param = PyObject_IsTrue(value);
254
255 if (param == -1) {
256 PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
257 return -1;
258 }
259
260 if (param) {
261 G.debug |= flag;
262 }
263 else {
264 G.debug &= ~flag;
265 }
266
267 return 0;
268}
269
271 /* Wrap. */
272 bpy_app_internet_offline_doc,
273 "Boolean, true when internet access is allowed by Blender & 3rd party scripts (read-only)");
275 /* Wrap. */
276 bpy_app_internet_offline_override_doc,
277 "Boolean, true when internet access preference is overridden by the command line (read-only)");
278
280 /* Wrap. */
281 bpy_app_global_flag_doc,
282 "Boolean, for application behavior "
283 "(started with ``--enable-*`` matching this attribute name)");
284static PyObject *bpy_app_global_flag_get(PyObject * /*self*/, void *closure)
285{
286 const int flag = POINTER_AS_INT(closure);
287 return PyBool_FromLong(G.f & flag);
288}
289
290static int bpy_app_global_flag_set(PyObject * /*self*/, PyObject *value, void *closure)
291{
292 const int flag = POINTER_AS_INT(closure);
293 const int param = PyObject_IsTrue(value);
294
295 if (param == -1) {
296 PyErr_SetString(PyExc_TypeError, "bpy.app.use_* can only be True/False");
297 return -1;
298 }
299
300 if (param) {
301 G.f |= flag;
302 }
303 else {
304 G.f &= ~flag;
305 }
306
307 return 0;
308}
309
310static int bpy_app_global_flag_set__only_disable(PyObject * /*self*/,
311 PyObject *value,
312 void *closure)
313{
314 const int param = PyObject_IsTrue(value);
315 if (param == 1) {
316 PyErr_SetString(PyExc_ValueError, "This bpy.app.use_* option can only be disabled");
317 return -1;
318 }
319 return bpy_app_global_flag_set(nullptr, value, closure);
320}
321
323 /* Wrap. */
324 bpy_app_debug_value_doc,
325 "Short, number which can be set to non-zero values for testing purposes");
326static PyObject *bpy_app_debug_value_get(PyObject * /*self*/, void * /*closure*/)
327{
328 return PyLong_FromLong(G.debug_value);
329}
330
331static int bpy_app_debug_value_set(PyObject * /*self*/, PyObject *value, void * /*closure*/)
332{
333 const short param = PyC_Long_AsI16(value);
334
335 if (param == -1 && PyErr_Occurred()) {
336 PyC_Err_SetString_Prefix(PyExc_TypeError,
337 "bpy.app.debug_value can only be set to a whole number");
338 return -1;
339 }
340
341 G.debug_value = param;
342
344
345 return 0;
346}
347
349 /* Wrap. */
350 bpy_app_tempdir_doc,
351 "String, the temp directory used by blender (read-only)");
352static PyObject *bpy_app_tempdir_get(PyObject * /*self*/, void * /*closure*/)
353{
355}
356
358 /* Wrap. */
359 bpy_app_driver_dict_doc,
360 "Dictionary for drivers namespace, editable in-place, reset on file load (read-only)");
361static PyObject *bpy_app_driver_dict_get(PyObject * /*self*/, void * /*closure*/)
362{
363 if (bpy_pydriver_Dict == nullptr) {
364 if (bpy_pydriver_create_dict() != 0) {
365 PyErr_SetString(PyExc_RuntimeError, "bpy.app.driver_namespace failed to create dictionary");
366 return nullptr;
367 }
368 }
369
370 return Py_NewRef(bpy_pydriver_Dict);
371}
372
374 /* Wrap. */
375 bpy_app_preview_render_size_doc,
376 "Reference size for icon/preview renders (read-only)");
377static PyObject *bpy_app_preview_render_size_get(PyObject * /*self*/, void *closure)
378{
379 return PyLong_FromLong(
381}
382
383static PyObject *bpy_app_autoexec_fail_message_get(PyObject * /*self*/, void * /*closure*/)
384{
385 return PyC_UnicodeFromBytes(G.autoexec_fail);
386}
387
389 /* Wrap. */
390 bpy_app_python_args_doc,
391 "Leading arguments to use when calling Python directly (via ``sys.executable``). "
392 "These arguments match settings Blender uses to "
393 "ensure Python runs with a compatible environment (read-only).");
394static PyObject *bpy_app_python_args_get(PyObject * /*self*/, void * /*closure*/)
395{
396 const char *args[1];
397 int args_num = 0;
399 /* Isolated Python environment. */
400 args[args_num++] = "-I";
401 }
402 return PyC_Tuple_PackArray_String(args, args_num);
403}
404
406 /* Wrap. */
407 bpy_app_binary_path_doc,
408 "The location of Blender's executable, useful for utilities that open new instances. "
409 "Read-only unless Blender is built as a Python module - in this case the value is "
410 "an empty string which script authors may point to a Blender binary.");
411static PyObject *bpy_app_binary_path_get(PyObject * /*self*/, void * /*closure*/)
412{
414}
415
416static int bpy_app_binary_path_set(PyObject * /*self*/, PyObject *value, void * /*closure*/)
417{
418#ifndef WITH_PYTHON_MODULE
419 PyErr_SetString(PyExc_AttributeError,
420 "bpy.app.binary_path is only writable when built as a Python module");
421 return -1;
422#endif
423 PyObject *value_coerce = nullptr;
424 const char *filepath = PyC_UnicodeAsBytes(value, &value_coerce);
425 if (filepath == nullptr) {
426 PyErr_Format(PyExc_ValueError, "expected a string or bytes, got %s", Py_TYPE(value)->tp_name);
427 return -1;
428 }
430 Py_XDECREF(value_coerce);
431 return 0;
432}
433
434static PyGetSetDef bpy_app_getsets[] = {
435 {"debug", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG},
436 {"debug_ffmpeg",
439 bpy_app_debug_doc,
440 (void *)G_DEBUG_FFMPEG},
441 {"debug_freestyle",
444 bpy_app_debug_doc,
445 (void *)G_DEBUG_FREESTYLE},
446 {"debug_python",
449 bpy_app_debug_doc,
450 (void *)G_DEBUG_PYTHON},
451 {"debug_events",
454 bpy_app_debug_doc,
455 (void *)G_DEBUG_EVENTS},
456 {"debug_handlers",
459 bpy_app_debug_doc,
460 (void *)G_DEBUG_HANDLERS},
461 {"debug_wm", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_WM},
462 {"debug_depsgraph",
465 bpy_app_debug_doc,
466 (void *)G_DEBUG_DEPSGRAPH},
467 {"debug_depsgraph_build",
470 bpy_app_debug_doc,
472 {"debug_depsgraph_eval",
475 bpy_app_debug_doc,
476 (void *)G_DEBUG_DEPSGRAPH_EVAL},
477 {"debug_depsgraph_tag",
480 bpy_app_debug_doc,
481 (void *)G_DEBUG_DEPSGRAPH_TAG},
482 {"debug_depsgraph_time",
485 bpy_app_debug_doc,
486 (void *)G_DEBUG_DEPSGRAPH_TIME},
487 {"debug_depsgraph_pretty",
490 bpy_app_debug_doc,
492 {"debug_simdata",
495 bpy_app_debug_doc,
496 (void *)G_DEBUG_SIMDATA},
497 {"debug_io", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_IO},
498
499 {"use_event_simulate",
502 bpy_app_global_flag_doc,
503 (void *)G_FLAG_EVENT_SIMULATE},
504
505 {"use_userpref_skip_save_on_exit",
508 bpy_app_global_flag_doc,
510
511 {"debug_value",
514 bpy_app_debug_value_doc,
515 nullptr},
516 {"tempdir", bpy_app_tempdir_get, nullptr, bpy_app_tempdir_doc, nullptr},
517 {"driver_namespace", bpy_app_driver_dict_get, nullptr, bpy_app_driver_dict_doc, nullptr},
518
519 {"render_icon_size",
521 nullptr,
522 bpy_app_preview_render_size_doc,
523 (void *)ICON_SIZE_ICON},
524 {"render_preview_size",
526 nullptr,
527 bpy_app_preview_render_size_doc,
528 (void *)ICON_SIZE_PREVIEW},
529
530 {"online_access",
532 nullptr,
533 bpy_app_internet_offline_doc,
534 (void *)G_FLAG_INTERNET_ALLOW},
535 {"online_access_override",
537 nullptr,
538 bpy_app_internet_offline_override_doc,
540
541 /* security */
542 {"autoexec_fail",
544 nullptr,
545 nullptr,
547 {"autoexec_fail_quiet",
549 nullptr,
550 nullptr,
552 {"autoexec_fail_message", bpy_app_autoexec_fail_message_get, nullptr, nullptr, nullptr},
553
554 {"python_args", bpy_app_python_args_get, nullptr, bpy_app_python_args_doc, nullptr},
555
556 /* Support script authors setting the Blender binary path to use, otherwise this value
557 * is not known when built as a Python module. */
558 {"binary_path",
561 bpy_app_binary_path_doc,
562 nullptr},
563
564 {nullptr, nullptr, nullptr, nullptr, nullptr},
565};
566
568 /* Wrap. */
569 bpy_app_is_job_running_doc,
570 ".. staticmethod:: is_job_running(job_type)\n"
571 "\n"
572 " Check whether a job of the given type is running.\n"
573 "\n"
574 " :arg job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n"
575 " :type job_type: str\n"
576 " :return: Whether a job of the given type is currently running.\n"
577 " :rtype: bool.\n");
578static PyObject *bpy_app_is_job_running(PyObject * /*self*/, PyObject *args, PyObject *kwds)
579{
580 BPy_EnumProperty_Parse job_type_enum{};
581 job_type_enum.items = rna_enum_wm_job_type_items;
582 job_type_enum.value = 0;
583
584 static const char *_keywords[] = {"job_type", nullptr};
585 static _PyArg_Parser _parser = {
587 "O&" /* `job_type` */
588 ":is_job_running",
589 _keywords,
590 nullptr,
591 };
592 if (!_PyArg_ParseTupleAndKeywordsFast(
593 args, kwds, &_parser, pyrna_enum_value_parse_string, &job_type_enum))
594 {
595 return nullptr;
596 }
597 wmWindowManager *wm = static_cast<wmWindowManager *>(G_MAIN->wm.first);
598 return PyBool_FromLong(WM_jobs_has_running_type(wm, job_type_enum.value));
599}
600
601char *(*BPY_python_app_help_text_fn)(bool all) = nullptr;
602
604 /* Wrap. */
605 bpy_app_help_text_doc,
606 ".. staticmethod:: help_text(all=False)\n"
607 "\n"
608 " Return the help text as a string.\n"
609 "\n"
610 " :arg all: Return all arguments, "
611 "even those which aren't available for the current platform.\n"
612 " :type all: bool\n");
613static PyObject *bpy_app_help_text(PyObject * /*self*/, PyObject *args, PyObject *kwds)
614{
615 bool all = false;
616 static const char *_keywords[] = {"all", nullptr};
617 static _PyArg_Parser _parser = {
619 "|$" /* Optional keyword only arguments. */
620 "O&" /* `all` */
621 ":help_text",
622 _keywords,
623 nullptr,
624 };
625 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, PyC_ParseBool, &all)) {
626 return nullptr;
627 }
628
629 char *buf = BPY_python_app_help_text_fn(all);
630 PyObject *result = PyUnicode_FromString(buf);
631 MEM_freeN(buf);
632 return result;
633}
634
635#ifdef __GNUC__
636# ifdef __clang__
637# pragma clang diagnostic push
638# pragma clang diagnostic ignored "-Wcast-function-type"
639# else
640# pragma GCC diagnostic push
641# pragma GCC diagnostic ignored "-Wcast-function-type"
642# endif
643#endif
644
645static PyMethodDef bpy_app_methods[] = {
646 {"is_job_running",
647 (PyCFunction)bpy_app_is_job_running,
648 METH_VARARGS | METH_KEYWORDS | METH_STATIC,
649 bpy_app_is_job_running_doc},
650 {"help_text",
651 (PyCFunction)bpy_app_help_text,
652 METH_VARARGS | METH_KEYWORDS | METH_STATIC,
653 bpy_app_help_text_doc},
654 {nullptr, nullptr, 0, nullptr},
655};
656
657#ifdef __GNUC__
658# ifdef __clang__
659# pragma clang diagnostic pop
660# else
661# pragma GCC diagnostic pop
662# endif
663#endif
664
666{
667 /* tricky dynamic members, not to py-spec! */
668 for (PyGetSetDef *getset = bpy_app_getsets; getset->name; getset++) {
669 PyObject *item = PyDescr_NewGetSet(&BlenderAppType, getset);
670 PyDict_SetItem(BlenderAppType.tp_dict, PyDescr_NAME(item), item);
671 Py_DECREF(item);
672 }
673}
674
676{
677 for (PyMethodDef *method = bpy_app_methods; method->ml_name; method++) {
678 BLI_assert_msg(method->ml_flags & METH_STATIC, "Only static methods make sense for 'bpy.app'");
679 PyObject *item = PyCFunction_New(method, nullptr);
680 PyDict_SetItemString(BlenderAppType.tp_dict, method->ml_name, item);
681 Py_DECREF(item);
682 }
683}
684
685/* end dynamic bpy.app */
686
687PyObject *BPY_app_struct()
688{
689 PyObject *ret;
690
691 PyStructSequence_InitType(&BlenderAppType, &app_info_desc);
692
693 ret = make_app_info();
694
695 /* prevent user from creating new instances */
696 BlenderAppType.tp_init = nullptr;
697 BlenderAppType.tp_new = nullptr;
698 /* Without this we can't do `set(sys.modules)` #29635. */
699 BlenderAppType.tp_hash = (hashfunc)Py_HashPointer;
700
701 /* Kind of a hack on top of #PyStructSequence. */
704
705 return ret;
706}
const char * BKE_appdir_program_path() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
Definition appdir.cc:952
void BKE_appdir_program_path_init(const char *argv0) ATTR_NONNULL(1)
Definition appdir.cc:929
#define BLENDER_VERSION_PATCH
const char * BKE_blender_version_string(void)
Definition blender.cc:143
#define BLENDER_VERSION_CYCLE
#define BLENDER_FILE_SUBVERSION
#define BLENDER_VERSION
#define BLENDER_FILE_VERSION
#define G_MAIN
#define G_FLAG_INTERNET_OVERRIDE_PREF_ANY
@ G_FLAG_EVENT_SIMULATE
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET
@ G_FLAG_USERPREF_NO_SAVE_ON_EXIT
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL
@ G_FLAG_INTERNET_ALLOW
@ G_DEBUG
@ G_DEBUG_HANDLERS
@ G_DEBUG_FREESTYLE
@ G_DEBUG_IO
@ G_DEBUG_SIMDATA
@ G_DEBUG_FFMPEG
@ G_DEBUG_DEPSGRAPH_PRETTY
@ G_DEBUG_DEPSGRAPH_TIME
@ G_DEBUG_DEPSGRAPH
@ G_DEBUG_DEPSGRAPH_EVAL
@ G_DEBUG_DEPSGRAPH_TAG
@ G_DEBUG_WM
@ G_DEBUG_EVENTS
@ G_DEBUG_PYTHON
@ G_DEBUG_DEPSGRAPH_BUILD
#define BLI_assert_msg(a, msg)
Definition BLI_assert.h:53
unsigned long ulong
#define ARRAY_SIZE(arr)
#define STRINGIFY(x)
#define POINTER_AS_INT(i)
bool BPY_python_use_system_env_get()
eIconSizes
@ ICON_SIZE_PREVIEW
@ ICON_SIZE_ICON
Read Guarded memory(de)allocation.
int UI_icon_preview_to_render_size(enum eIconSizes size)
#define NC_WINDOW
Definition WM_types.hh:372
static int bpy_app_binary_path_set(PyObject *, PyObject *value, void *)
Definition bpy_app.cc:416
static PyObject * bpy_app_debug_value_get(PyObject *, void *)
Definition bpy_app.cc:326
char build_type[]
Definition bpy_app.cc:68
static void py_struct_seq_getset_init()
Definition bpy_app.cc:665
char build_cflags[]
Definition bpy_app.cc:69
static PyObject * bpy_app_autoexec_fail_message_get(PyObject *, void *)
Definition bpy_app.cc:383
char build_hash[]
Definition bpy_app.cc:65
static PyStructSequence_Field app_info_fields[]
Definition bpy_app.cc:77
static PyObject * bpy_app_tempdir_get(PyObject *, void *)
Definition bpy_app.cc:352
static int bpy_app_debug_value_set(PyObject *, PyObject *value, void *)
Definition bpy_app.cc:331
static PyObject * make_app_info()
Definition bpy_app.cc:141
char build_commit_date[]
Definition bpy_app.cc:63
static PyObject * bpy_app_preview_render_size_get(PyObject *, void *closure)
Definition bpy_app.cc:377
static int bpy_app_global_flag_set(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:290
PyObject * BPY_app_struct()
Definition bpy_app.cc:687
#define SetBytesItem(str)
static PyGetSetDef bpy_app_getsets[]
Definition bpy_app.cc:434
static PyObject * bpy_app_global_flag_get(PyObject *, void *closure)
Definition bpy_app.cc:284
static int bpy_app_global_flag_set__only_disable(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:310
ulong build_commit_timestamp
Definition bpy_app.cc:62
static int bpy_app_debug_set(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:250
char build_commit_time[]
Definition bpy_app.cc:64
char build_linkflags[]
Definition bpy_app.cc:71
static PyObject * bpy_app_python_args_get(PyObject *, void *)
Definition bpy_app.cc:394
char build_system[]
Definition bpy_app.cc:72
char build_branch[]
Definition bpy_app.cc:66
#define SetIntItem(flag)
char build_date[]
Definition bpy_app.cc:60
PyDoc_STRVAR(bpy_app_doc, "This module contains application values that remain unchanged during runtime.")
char build_cxxflags[]
Definition bpy_app.cc:70
static PyObject * bpy_app_binary_path_get(PyObject *, void *)
Definition bpy_app.cc:411
#define SetStrItem(str)
char *(* BPY_python_app_help_text_fn)(bool all)
Definition bpy_app.cc:601
static void py_struct_seq_method_init()
Definition bpy_app.cc:675
static PyMethodDef bpy_app_methods[]
Definition bpy_app.cc:645
static PyStructSequence_Desc app_info_desc
Definition bpy_app.cc:134
static PyObject * bpy_app_driver_dict_get(PyObject *, void *)
Definition bpy_app.cc:361
static PyObject * bpy_app_debug_get(PyObject *, void *closure)
Definition bpy_app.cc:244
char build_time[]
Definition bpy_app.cc:61
static PyTypeObject BlenderAppType
Definition bpy_app.cc:75
char build_platform[]
Definition bpy_app.cc:67
static PyObject * bpy_app_help_text(PyObject *, PyObject *args, PyObject *kwds)
Definition bpy_app.cc:613
#define SetObjItem(obj)
static PyObject * bpy_app_is_job_running(PyObject *, PyObject *args, PyObject *kwds)
Definition bpy_app.cc:578
PyObject * BPY_app_alembic_struct()
PyObject * BPY_app_build_options_struct()
PyObject * BPY_app_ffmpeg_struct()
PyObject * BPY_app_handlers_struct()
PyObject * BPY_app_icons_module()
PyObject * BPY_app_ocio_struct()
PyObject * BPY_app_oiio_struct()
PyObject * BPY_app_opensubdiv_struct()
PyObject * BPY_app_openvdb_struct()
PyObject * BPY_app_sdl_struct()
PyObject * BPY_app_timers_module()
PyObject * BPY_app_translations_struct()
PyObject * BPY_app_usd_struct()
PyObject * bpy_pydriver_Dict
Definition bpy_driver.cc:52
int bpy_pydriver_create_dict()
Definition bpy_driver.cc:58
uint pos
bool all(VecOp< bool, D >) RET
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
#define G(x, y, z)
int pyrna_enum_value_parse_string(PyObject *o, void *p)
int16_t PyC_Long_AsI16(PyObject *value)
PyObject * PyC_Err_SetString_Prefix(PyObject *exception_type_prefix, const char *str)
PyObject * PyC_UnicodeFromBytes(const char *str)
PyObject * PyC_Tuple_PackArray_String(const char **array, uint len)
int PyC_ParseBool(PyObject *o, void *p)
const char * PyC_UnicodeAsBytes(PyObject *py_str, PyObject **r_coerce)
PyObject * PyC_Tuple_Pack_I32(const blender::Span< int > values)
header-only compatibility defines.
#define Py_HashPointer
#define PY_ARG_PARSER_HEAD_COMPAT()
return ret
const EnumPropertyItem rna_enum_wm_job_type_items[]
Definition rna_wm.cc:206
const EnumPropertyItem * items
void * BKE_tempdir_session
Definition stubs.c:38
void WM_main_add_notifier(uint type, void *reference)
bool WM_jobs_has_running_type(const wmWindowManager *wm, int job_type)
Definition wm_jobs.cc:757
uint8_t flag
Definition wm_window.cc:139