Blender V4.3
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
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 "DNA_ID.h"
46
47#include "UI_interface_icons.hh"
48
49#include "MEM_guardedalloc.h"
50
51#include "RNA_enum_types.hh" /* For `rna_enum_wm_job_type_items`. */
52
53/* for notifiers */
54#include "WM_api.hh"
55#include "WM_types.hh"
56
61
62#ifdef BUILD_DATE
63extern "C" char build_date[];
64extern "C" char build_time[];
66extern "C" char build_commit_date[];
67extern "C" char build_commit_time[];
68extern "C" char build_hash[];
69extern "C" char build_branch[];
70extern "C" char build_platform[];
71extern "C" char build_type[];
72extern "C" char build_cflags[];
73extern "C" char build_cxxflags[];
74extern "C" char build_linkflags[];
75extern "C" char build_system[];
76#endif
77
78static PyTypeObject BlenderAppType;
79
80static PyStructSequence_Field app_info_fields[] = {
81 {"version", "The Blender version as a tuple of 3 numbers. eg. (2, 83, 1)"},
82 {"version_file",
83 "The Blender version, as a tuple, last used to save a .blend file, compatible with "
84 "``bpy.data.version``. This value should be used for handling compatibility changes between "
85 "Blender versions"},
86 {"version_string", "The Blender version formatted as a string"},
87 {"version_cycle", "The release status of this build alpha/beta/rc/release"},
88 {"background",
89 "Boolean, True when blender is running without a user interface (started with -b)"},
90 {"factory_startup", "Boolean, True when blender is running with --factory-startup)"},
91
92 /* buildinfo */
93 {"build_date", "The date this blender instance was built"},
94 {"build_time", "The time this blender instance was built"},
95 {"build_commit_timestamp", "The unix timestamp of commit this blender instance was built"},
96 {"build_commit_date", "The date of commit this blender instance was built"},
97 {"build_commit_time", "The time of commit this blender instance was built"},
98 {"build_hash", "The commit hash this blender instance was built with"},
99 {"build_branch", "The branch this blender instance was built from"},
100 {"build_platform", "The platform this blender instance was built for"},
101 {"build_type", "The type of build (Release, Debug)"},
102 {"build_cflags", "C compiler flags"},
103 {"build_cxxflags", "C++ compiler flags"},
104 {"build_linkflags", "Binary linking flags"},
105 {"build_system", "Build system used"},
106
107 /* submodules */
108 {"alembic", "Alembic library information backend"},
109 {"usd", "USD library information backend"},
110 {"ffmpeg", "FFmpeg library information backend"},
111 {"ocio", "OpenColorIO library information backend"},
112 {"oiio", "OpenImageIO library information backend"},
113 {"opensubdiv", "OpenSubdiv library information backend"},
114 {"openvdb", "OpenVDB library information backend"},
115 {"sdl", "SDL library information backend"},
116 {"build_options", "A set containing most important enabled optional build features"},
117 {"handlers", "Application handler callbacks"},
118 {"translations", "Application and addons internationalization API"},
119
120 /* Modules (not struct sequence). */
121 {"icons", "Manage custom icons"},
122 {"timers", "Manage timers"},
123 {nullptr},
124};
125
127 /* Wrap. */
128 bpy_app_doc,
129 "This module contains application values that remain unchanged during runtime.");
130
131static PyStructSequence_Desc app_info_desc = {
132 /*name*/ "bpy.app",
133 /*doc*/ bpy_app_doc,
134 /*fields*/ app_info_fields,
135 /*n_in_sequence*/ ARRAY_SIZE(app_info_fields) - 1,
136};
137
138static PyObject *make_app_info()
139{
140 PyObject *app_info;
141 int pos = 0;
142
143 app_info = PyStructSequence_New(&BlenderAppType);
144 if (app_info == nullptr) {
145 return nullptr;
146 }
147#define SetIntItem(flag) PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
148#define SetStrItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
149#define SetBytesItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyBytes_FromString(str))
150#define SetObjItem(obj) PyStructSequence_SET_ITEM(app_info, pos++, obj)
151
157
159 SetObjItem(PyBool_FromLong(G.background));
160 SetObjItem(PyBool_FromLong(G.factory_startup));
161
162/* build info, use bytes since we can't assume _any_ encoding:
163 * see patch #30154 for issue */
164#ifdef BUILD_DATE
178#else
179 SetBytesItem("Unknown");
180 SetBytesItem("Unknown");
181 SetIntItem(0);
182 SetBytesItem("Unknown");
183 SetBytesItem("Unknown");
184 SetBytesItem("Unknown");
185 SetBytesItem("Unknown");
186 SetBytesItem("Unknown");
187 SetBytesItem("Unknown");
188 SetBytesItem("Unknown");
189 SetBytesItem("Unknown");
190 SetBytesItem("Unknown");
191 SetBytesItem("Unknown");
192#endif
193
205
206 /* modules */
209
210#undef SetIntItem
211#undef SetStrItem
212#undef SetBytesItem
213#undef SetObjItem
214
215 if (PyErr_Occurred()) {
216 Py_DECREF(app_info);
217 return nullptr;
218 }
219 return app_info;
220}
221
222/* a few getsets because it makes sense for them to be in bpy.app even though
223 * they are not static */
224
226 /* Wrap. */
227 bpy_app_debug_doc,
228 "Boolean, for debug info "
229 "(started with ``--debug`` / ``--debug-*`` matching this attribute name)");
230static PyObject *bpy_app_debug_get(PyObject * /*self*/, void *closure)
231{
232 const int flag = POINTER_AS_INT(closure);
233 return PyBool_FromLong(G.debug & flag);
234}
235
236static int bpy_app_debug_set(PyObject * /*self*/, PyObject *value, void *closure)
237{
238 const int flag = POINTER_AS_INT(closure);
239 const int param = PyObject_IsTrue(value);
240
241 if (param == -1) {
242 PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
243 return -1;
244 }
245
246 if (param) {
247 G.debug |= flag;
248 }
249 else {
250 G.debug &= ~flag;
251 }
252
253 return 0;
254}
255
257 /* Wrap. */
258 bpy_app_internet_offline_doc,
259 "Boolean, true when internet access is allowed by Blender & 3rd party scripts (read-only)");
261 /* Wrap. */
262 bpy_app_internet_offline_override_doc,
263 "Boolean, true when internet access preference is overridden by the command line (read-only)");
264
266 /* Wrap. */
267 bpy_app_global_flag_doc,
268 "Boolean, for application behavior "
269 "(started with ``--enable-*`` matching this attribute name)");
270static PyObject *bpy_app_global_flag_get(PyObject * /*self*/, void *closure)
271{
272 const int flag = POINTER_AS_INT(closure);
273 return PyBool_FromLong(G.f & flag);
274}
275
276static int bpy_app_global_flag_set(PyObject * /*self*/, PyObject *value, void *closure)
277{
278 const int flag = POINTER_AS_INT(closure);
279 const int param = PyObject_IsTrue(value);
280
281 if (param == -1) {
282 PyErr_SetString(PyExc_TypeError, "bpy.app.use_* can only be True/False");
283 return -1;
284 }
285
286 if (param) {
287 G.f |= flag;
288 }
289 else {
290 G.f &= ~flag;
291 }
292
293 return 0;
294}
295
296static int bpy_app_global_flag_set__only_disable(PyObject * /*self*/,
297 PyObject *value,
298 void *closure)
299{
300 const int param = PyObject_IsTrue(value);
301 if (param == 1) {
302 PyErr_SetString(PyExc_ValueError, "This bpy.app.use_* option can only be disabled");
303 return -1;
304 }
305 return bpy_app_global_flag_set(nullptr, value, closure);
306}
307
309 /* Wrap. */
310 bpy_app_debug_value_doc,
311 "Short, number which can be set to non-zero values for testing purposes");
312static PyObject *bpy_app_debug_value_get(PyObject * /*self*/, void * /*closure*/)
313{
314 return PyLong_FromLong(G.debug_value);
315}
316
317static int bpy_app_debug_value_set(PyObject * /*self*/, PyObject *value, void * /*closure*/)
318{
319 const short param = PyC_Long_AsI16(value);
320
321 if (param == -1 && PyErr_Occurred()) {
322 PyC_Err_SetString_Prefix(PyExc_TypeError,
323 "bpy.app.debug_value can only be set to a whole number");
324 return -1;
325 }
326
327 G.debug_value = param;
328
330
331 return 0;
332}
333
335 /* Wrap. */
336 bpy_app_tempdir_doc,
337 "String, the temp directory used by blender (read-only)");
338static PyObject *bpy_app_tempdir_get(PyObject * /*self*/, void * /*closure*/)
339{
341}
342
344 /* Wrap. */
345 bpy_app_driver_dict_doc,
346 "Dictionary for drivers namespace, editable in-place, reset on file load (read-only)");
347static PyObject *bpy_app_driver_dict_get(PyObject * /*self*/, void * /*closure*/)
348{
349 if (bpy_pydriver_Dict == nullptr) {
350 if (bpy_pydriver_create_dict() != 0) {
351 PyErr_SetString(PyExc_RuntimeError, "bpy.app.driver_namespace failed to create dictionary");
352 return nullptr;
353 }
354 }
355
356 return Py_NewRef(bpy_pydriver_Dict);
357}
358
360 /* Wrap. */
361 bpy_app_preview_render_size_doc,
362 "Reference size for icon/preview renders (read-only)");
363static PyObject *bpy_app_preview_render_size_get(PyObject * /*self*/, void *closure)
364{
365 return PyLong_FromLong(
367}
368
369static PyObject *bpy_app_autoexec_fail_message_get(PyObject * /*self*/, void * /*closure*/)
370{
371 return PyC_UnicodeFromBytes(G.autoexec_fail);
372}
373
375 /* Wrap. */
376 bpy_app_python_args_doc,
377 "Leading arguments to use when calling Python directly (via ``sys.executable``). "
378 "These arguments match settings Blender uses to "
379 "ensure Python runs with a compatible environment (read-only).");
380static PyObject *bpy_app_python_args_get(PyObject * /*self*/, void * /*closure*/)
381{
382 const char *args[1];
383 int args_num = 0;
385 /* Isolated Python environment. */
386 args[args_num++] = "-I";
387 }
388 return PyC_Tuple_PackArray_String(args, args_num);
389}
390
392 /* Wrap. */
393 bpy_app_binary_path_doc,
394 "The location of Blender's executable, useful for utilities that open new instances. "
395 "Read-only unless Blender is built as a Python module - in this case the value is "
396 "an empty string which script authors may point to a Blender binary.");
397static PyObject *bpy_app_binary_path_get(PyObject * /*self*/, void * /*closure*/)
398{
400}
401
402static int bpy_app_binary_path_set(PyObject * /*self*/, PyObject *value, void * /*closure*/)
403{
404#ifndef WITH_PYTHON_MODULE
405 PyErr_SetString(PyExc_AttributeError,
406 "bpy.app.binary_path is only writable when built as a Python module");
407 return -1;
408#endif
409 PyObject *value_coerce = nullptr;
410 const char *filepath = PyC_UnicodeAsBytes(value, &value_coerce);
411 if (filepath == nullptr) {
412 PyErr_Format(PyExc_ValueError, "expected a string or bytes, got %s", Py_TYPE(value)->tp_name);
413 return -1;
414 }
416 Py_XDECREF(value_coerce);
417 return 0;
418}
419
420static PyGetSetDef bpy_app_getsets[] = {
421 {"debug", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG},
422 {"debug_ffmpeg",
425 bpy_app_debug_doc,
426 (void *)G_DEBUG_FFMPEG},
427 {"debug_freestyle",
430 bpy_app_debug_doc,
431 (void *)G_DEBUG_FREESTYLE},
432 {"debug_python",
435 bpy_app_debug_doc,
436 (void *)G_DEBUG_PYTHON},
437 {"debug_events",
440 bpy_app_debug_doc,
441 (void *)G_DEBUG_EVENTS},
442 {"debug_handlers",
445 bpy_app_debug_doc,
446 (void *)G_DEBUG_HANDLERS},
447 {"debug_wm", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_WM},
448 {"debug_depsgraph",
451 bpy_app_debug_doc,
452 (void *)G_DEBUG_DEPSGRAPH},
453 {"debug_depsgraph_build",
456 bpy_app_debug_doc,
458 {"debug_depsgraph_eval",
461 bpy_app_debug_doc,
462 (void *)G_DEBUG_DEPSGRAPH_EVAL},
463 {"debug_depsgraph_tag",
466 bpy_app_debug_doc,
467 (void *)G_DEBUG_DEPSGRAPH_TAG},
468 {"debug_depsgraph_time",
471 bpy_app_debug_doc,
472 (void *)G_DEBUG_DEPSGRAPH_TIME},
473 {"debug_depsgraph_pretty",
476 bpy_app_debug_doc,
478 {"debug_simdata",
481 bpy_app_debug_doc,
482 (void *)G_DEBUG_SIMDATA},
483 {"debug_io", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_IO},
484
485 {"use_event_simulate",
488 bpy_app_global_flag_doc,
489 (void *)G_FLAG_EVENT_SIMULATE},
490
491 {"use_userpref_skip_save_on_exit",
494 bpy_app_global_flag_doc,
496
497 {"debug_value",
500 bpy_app_debug_value_doc,
501 nullptr},
502 {"tempdir", bpy_app_tempdir_get, nullptr, bpy_app_tempdir_doc, nullptr},
503 {"driver_namespace", bpy_app_driver_dict_get, nullptr, bpy_app_driver_dict_doc, nullptr},
504
505 {"render_icon_size",
507 nullptr,
508 bpy_app_preview_render_size_doc,
509 (void *)ICON_SIZE_ICON},
510 {"render_preview_size",
512 nullptr,
513 bpy_app_preview_render_size_doc,
514 (void *)ICON_SIZE_PREVIEW},
515
516 {"online_access",
518 nullptr,
519 bpy_app_internet_offline_doc,
520 (void *)G_FLAG_INTERNET_ALLOW},
521 {"online_access_override",
523 nullptr,
524 bpy_app_internet_offline_override_doc,
526
527 /* security */
528 {"autoexec_fail",
530 nullptr,
531 nullptr,
533 {"autoexec_fail_quiet",
535 nullptr,
536 nullptr,
538 {"autoexec_fail_message", bpy_app_autoexec_fail_message_get, nullptr, nullptr, nullptr},
539
540 {"python_args", bpy_app_python_args_get, nullptr, bpy_app_python_args_doc, nullptr},
541
542 /* Support script authors setting the Blender binary path to use, otherwise this value
543 * is not known when built as a Python module. */
544 {"binary_path",
547 bpy_app_binary_path_doc,
548 nullptr},
549
550 {nullptr, nullptr, nullptr, nullptr, nullptr},
551};
552
554 /* Wrap. */
555 bpy_app_is_job_running_doc,
556 ".. staticmethod:: is_job_running(job_type)\n"
557 "\n"
558 " Check whether a job of the given type is running.\n"
559 "\n"
560 " :arg job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n"
561 " :type job_type: str\n"
562 " :return: Whether a job of the given type is currently running.\n"
563 " :rtype: bool.\n");
564static PyObject *bpy_app_is_job_running(PyObject * /*self*/, PyObject *args, PyObject *kwds)
565{
566 BPy_EnumProperty_Parse job_type_enum{};
567 job_type_enum.items = rna_enum_wm_job_type_items;
568 job_type_enum.value = 0;
569
570 static const char *_keywords[] = {"job_type", nullptr};
571 static _PyArg_Parser _parser = {
573 "O&" /* `job_type` */
574 ":is_job_running",
575 _keywords,
576 nullptr,
577 };
578 if (!_PyArg_ParseTupleAndKeywordsFast(
579 args, kwds, &_parser, pyrna_enum_value_parse_string, &job_type_enum))
580 {
581 return nullptr;
582 }
583 wmWindowManager *wm = static_cast<wmWindowManager *>(G_MAIN->wm.first);
584 return PyBool_FromLong(WM_jobs_has_running_type(wm, job_type_enum.value));
585}
586
587char *(*BPY_python_app_help_text_fn)(bool all) = nullptr;
588
590 /* Wrap. */
591 bpy_app_help_text_doc,
592 ".. staticmethod:: help_text(all=False)\n"
593 "\n"
594 " Return the help text as a string.\n"
595 "\n"
596 " :arg all: Return all arguments, "
597 "even those which aren't available for the current platform.\n"
598 " :type all: bool\n");
599static PyObject *bpy_app_help_text(PyObject * /*self*/, PyObject *args, PyObject *kwds)
600{
601 bool all = false;
602 static const char *_keywords[] = {"all", nullptr};
603 static _PyArg_Parser _parser = {
605 "|$" /* Optional keyword only arguments. */
606 "O&" /* `all` */
607 ":help_text",
608 _keywords,
609 nullptr,
610 };
611 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, PyC_ParseBool, &all)) {
612 return nullptr;
613 }
614
615 char *buf = BPY_python_app_help_text_fn(all);
616 PyObject *result = PyUnicode_FromString(buf);
617 MEM_freeN(buf);
618 return result;
619}
620
621#if (defined(__GNUC__) && !defined(__clang__))
622# pragma GCC diagnostic push
623# pragma GCC diagnostic ignored "-Wcast-function-type"
624#endif
625
626static PyMethodDef bpy_app_methods[] = {
627 {"is_job_running",
628 (PyCFunction)bpy_app_is_job_running,
629 METH_VARARGS | METH_KEYWORDS | METH_STATIC,
630 bpy_app_is_job_running_doc},
631 {"help_text",
632 (PyCFunction)bpy_app_help_text,
633 METH_VARARGS | METH_KEYWORDS | METH_STATIC,
634 bpy_app_help_text_doc},
635 {nullptr, nullptr, 0, nullptr},
636};
637
638#if (defined(__GNUC__) && !defined(__clang__))
639# pragma GCC diagnostic pop
640#endif
641
643{
644 /* tricky dynamic members, not to py-spec! */
645 for (PyGetSetDef *getset = bpy_app_getsets; getset->name; getset++) {
646 PyObject *item = PyDescr_NewGetSet(&BlenderAppType, getset);
647 PyDict_SetItem(BlenderAppType.tp_dict, PyDescr_NAME(item), item);
648 Py_DECREF(item);
649 }
650}
651
653{
654 for (PyMethodDef *method = bpy_app_methods; method->ml_name; method++) {
655 BLI_assert_msg(method->ml_flags & METH_STATIC, "Only static methods make sense for 'bpy.app'");
656 PyObject *item = PyCFunction_New(method, nullptr);
657 PyDict_SetItemString(BlenderAppType.tp_dict, method->ml_name, item);
658 Py_DECREF(item);
659 }
660}
661
662/* end dynamic bpy.app */
663
664PyObject *BPY_app_struct()
665{
666 PyObject *ret;
667
668 PyStructSequence_InitType(&BlenderAppType, &app_info_desc);
669
670 ret = make_app_info();
671
672 /* prevent user from creating new instances */
673 BlenderAppType.tp_init = nullptr;
674 BlenderAppType.tp_new = nullptr;
675 /* Without this we can't do `set(sys.modules)` #29635. */
676 BlenderAppType.tp_hash = (hashfunc)_Py_HashPointer;
677
678 /* Kind of a hack on top of #PyStructSequence. */
681
682 return ret;
683}
const char * BKE_appdir_program_path() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
Definition appdir.cc:940
void BKE_appdir_program_path_init(const char *argv0) ATTR_NONNULL(1)
Definition appdir.cc:917
#define BLENDER_VERSION_PATCH
const char * BKE_blender_version_string(void)
Definition blender.cc:139
#define BLENDER_VERSION_CYCLE
#define BLENDER_FILE_SUBVERSION
#define BLENDER_VERSION
#define BLENDER_FILE_VERSION
@ 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
#define G_MAIN
#define G_FLAG_INTERNET_OVERRIDE_PREF_ANY
@ 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:57
unsigned long ulong
#define ARRAY_SIZE(arr)
#define STRINGIFY(x)
#define POINTER_AS_INT(i)
bool BPY_python_use_system_env_get()
ID and Library types, which are fundamental for SDNA.
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:342
static int bpy_app_binary_path_set(PyObject *, PyObject *value, void *)
Definition bpy_app.cc:402
static PyObject * bpy_app_debug_value_get(PyObject *, void *)
Definition bpy_app.cc:312
char build_type[]
Definition bpy_app.cc:71
static void py_struct_seq_getset_init()
Definition bpy_app.cc:642
char build_cflags[]
Definition bpy_app.cc:72
static PyObject * bpy_app_autoexec_fail_message_get(PyObject *, void *)
Definition bpy_app.cc:369
static PyStructSequence_Field app_info_fields[]
Definition bpy_app.cc:80
static PyObject * bpy_app_tempdir_get(PyObject *, void *)
Definition bpy_app.cc:338
static int bpy_app_debug_value_set(PyObject *, PyObject *value, void *)
Definition bpy_app.cc:317
static PyObject * make_app_info()
Definition bpy_app.cc:138
char build_commit_date[]
Definition bpy_app.cc:66
static PyObject * bpy_app_preview_render_size_get(PyObject *, void *closure)
Definition bpy_app.cc:363
static int bpy_app_global_flag_set(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:276
PyObject * BPY_app_struct()
Definition bpy_app.cc:664
#define SetBytesItem(str)
static PyGetSetDef bpy_app_getsets[]
Definition bpy_app.cc:420
static PyObject * bpy_app_global_flag_get(PyObject *, void *closure)
Definition bpy_app.cc:270
static int bpy_app_global_flag_set__only_disable(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:296
ulong build_commit_timestamp
Definition bpy_app.cc:65
static int bpy_app_debug_set(PyObject *, PyObject *value, void *closure)
Definition bpy_app.cc:236
char build_commit_time[]
Definition bpy_app.cc:67
char build_linkflags[]
Definition bpy_app.cc:74
static PyObject * bpy_app_python_args_get(PyObject *, void *)
Definition bpy_app.cc:380
char build_system[]
Definition bpy_app.cc:75
char build_branch[]
Definition bpy_app.cc:69
#define SetIntItem(flag)
char build_date[]
Definition bpy_app.cc:63
PyDoc_STRVAR(bpy_app_doc, "This module contains application values that remain unchanged during runtime.")
char build_cxxflags[]
Definition bpy_app.cc:73
static PyObject * bpy_app_binary_path_get(PyObject *, void *)
Definition bpy_app.cc:397
#define SetStrItem(str)
char *(* BPY_python_app_help_text_fn)(bool all)
Definition bpy_app.cc:587
static void py_struct_seq_method_init()
Definition bpy_app.cc:652
static PyMethodDef bpy_app_methods[]
Definition bpy_app.cc:626
static PyStructSequence_Desc app_info_desc
Definition bpy_app.cc:131
static PyObject * bpy_app_driver_dict_get(PyObject *, void *)
Definition bpy_app.cc:347
static PyObject * bpy_app_debug_get(PyObject *, void *closure)
Definition bpy_app.cc:230
char build_time[]
Definition bpy_app.cc:64
static PyTypeObject BlenderAppType
Definition bpy_app.cc:78
char build_platform[]
Definition bpy_app.cc:70
static PyObject * bpy_app_help_text(PyObject *, PyObject *args, PyObject *kwds)
Definition bpy_app.cc:599
#define SetObjItem(obj)
char build_hash[]
Definition bpy_app.cc:68
static PyObject * bpy_app_is_job_running(PyObject *, PyObject *args, PyObject *kwds)
Definition bpy_app.cc:564
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:46
int bpy_pydriver_create_dict()
Definition bpy_driver.cc:52
void MEM_freeN(void *vmemh)
Definition mallocn.cc:105
#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_ARG_PARSER_HEAD_COMPAT()
header-only utilities
return ret
const EnumPropertyItem rna_enum_wm_job_type_items[]
Definition rna_wm.cc:197
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:756
uint8_t flag
Definition wm_window.cc:138