Blender  V3.3
bpy_app.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
11 #include <Python.h>
12 
13 #include "bpy_app.h"
14 
15 #include "bpy_app_alembic.h"
16 #include "bpy_app_build_options.h"
17 #include "bpy_app_ffmpeg.h"
18 #include "bpy_app_ocio.h"
19 #include "bpy_app_oiio.h"
20 #include "bpy_app_opensubdiv.h"
21 #include "bpy_app_openvdb.h"
22 #include "bpy_app_sdl.h"
23 #include "bpy_app_usd.h"
24 
25 #include "bpy_app_translations.h"
26 
27 #include "bpy_app_handlers.h"
28 #include "bpy_driver.h"
29 
30 /* modules */
31 #include "bpy_app_icons.h"
32 #include "bpy_app_timers.h"
33 
34 #include "BLI_utildefines.h"
35 
36 #include "BKE_appdir.h"
37 #include "BKE_blender_version.h"
38 #include "BKE_global.h"
39 #include "BKE_main.h"
40 
41 #include "DNA_ID.h"
42 
43 #include "UI_interface_icons.h"
44 
45 #include "RNA_enum_types.h" /* For `rna_enum_wm_job_type_items`. */
46 
47 /* for notifiers */
48 #include "WM_api.h"
49 #include "WM_types.h"
50 
51 #include "../generic/py_capi_rna.h"
52 #include "../generic/py_capi_utils.h"
53 #include "../generic/python_utildefines.h"
54 
55 #ifdef BUILD_DATE
56 extern char build_date[];
57 extern char build_time[];
59 extern char build_commit_date[];
60 extern char build_commit_time[];
61 extern char build_hash[];
62 extern char build_branch[];
63 extern char build_platform[];
64 extern char build_type[];
65 extern char build_cflags[];
66 extern char build_cxxflags[];
67 extern char build_linkflags[];
68 extern char build_system[];
69 #endif
70 
71 static PyTypeObject BlenderAppType;
72 
73 static PyStructSequence_Field app_info_fields[] = {
74  {"version", "The Blender version as a tuple of 3 numbers. eg. (2, 83, 1)"},
75  {"version_file",
76  "The Blender version, as a tuple, last used to save a .blend file, compatible with "
77  "``bpy.data.version``. This value should be used for handling compatibility changes between "
78  "Blender versions"},
79  {"version_string", "The Blender version formatted as a string"},
80  {"version_cycle", "The release status of this build alpha/beta/rc/release"},
81  {"version_char", "Deprecated, always an empty string"},
82  {"binary_path",
83  "The location of Blender's executable, useful for utilities that open new instances"},
84  {"background",
85  "Boolean, True when blender is running without a user interface (started with -b)"},
86  {"factory_startup", "Boolean, True when blender is running with --factory-startup)"},
87 
88  /* buildinfo */
89  {"build_date", "The date this blender instance was built"},
90  {"build_time", "The time this blender instance was built"},
91  {"build_commit_timestamp", "The unix timestamp of commit this blender instance was built"},
92  {"build_commit_date", "The date of commit this blender instance was built"},
93  {"build_commit_time", "The time of commit this blender instance was built"},
94  {"build_hash", "The commit hash this blender instance was built with"},
95  {"build_branch", "The branch this blender instance was built from"},
96  {"build_platform", "The platform this blender instance was built for"},
97  {"build_type", "The type of build (Release, Debug)"},
98  {"build_cflags", "C compiler flags"},
99  {"build_cxxflags", "C++ compiler flags"},
100  {"build_linkflags", "Binary linking flags"},
101  {"build_system", "Build system used"},
102 
103  /* submodules */
104  {"alembic", "Alembic library information backend"},
105  {"usd", "USD library information backend"},
106  {"ffmpeg", "FFmpeg library information backend"},
107  {"ocio", "OpenColorIO library information backend"},
108  {"oiio", "OpenImageIO library information backend"},
109  {"opensubdiv", "OpenSubdiv library information backend"},
110  {"openvdb", "OpenVDB library information backend"},
111  {"sdl", "SDL library information backend"},
112  {"build_options", "A set containing most important enabled optional build features"},
113  {"handlers", "Application handler callbacks"},
114  {"translations", "Application and addons internationalization API"},
115 
116  /* Modules (not struct sequence). */
117  {"icons", "Manage custom icons"},
118  {"timers", "Manage timers"},
119  {NULL},
120 };
121 
122 PyDoc_STRVAR(bpy_app_doc,
123  "This module contains application values that remain unchanged during runtime.");
124 
125 static PyStructSequence_Desc app_info_desc = {
126  "bpy.app", /* name */
127  bpy_app_doc, /* doc */
128  app_info_fields, /* fields */
130 };
131 
132 static PyObject *make_app_info(void)
133 {
134  PyObject *app_info;
135  int pos = 0;
136 
137  app_info = PyStructSequence_New(&BlenderAppType);
138  if (app_info == NULL) {
139  return NULL;
140  }
141 #define SetIntItem(flag) PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
142 #define SetStrItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
143 #define SetBytesItem(str) PyStructSequence_SET_ITEM(app_info, pos++, PyBytes_FromString(str))
144 #define SetObjItem(obj) PyStructSequence_SET_ITEM(app_info, pos++, obj)
145 
146  SetObjItem(
151 
153  SetStrItem("");
155  SetObjItem(PyBool_FromLong(G.background));
156  SetObjItem(PyBool_FromLong(G.factory_startup));
157 
158  /* build info, use bytes since we can't assume _any_ encoding:
159  * see patch T30154 for issue */
160 #ifdef BUILD_DATE
174 #else
175  SetBytesItem("Unknown");
176  SetBytesItem("Unknown");
177  SetIntItem(0);
178  SetBytesItem("Unknown");
179  SetBytesItem("Unknown");
180  SetBytesItem("Unknown");
181  SetBytesItem("Unknown");
182  SetBytesItem("Unknown");
183  SetBytesItem("Unknown");
184  SetBytesItem("Unknown");
185  SetBytesItem("Unknown");
186  SetBytesItem("Unknown");
187  SetBytesItem("Unknown");
188 #endif
189 
201 
202  /* modules */
205 
206 #undef SetIntItem
207 #undef SetStrItem
208 #undef SetBytesItem
209 #undef SetObjItem
210 
211  if (PyErr_Occurred()) {
212  Py_DECREF(app_info);
213  return NULL;
214  }
215  return app_info;
216 }
217 
218 /* a few getsets because it makes sense for them to be in bpy.app even though
219  * they are not static */
220 
222  bpy_app_debug_doc,
223  "Boolean, for debug info (started with --debug / --debug_* matching this attribute name)");
224 static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *closure)
225 {
226  const int flag = POINTER_AS_INT(closure);
227  return PyBool_FromLong(G.debug & flag);
228 }
229 
230 static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *closure)
231 {
232  const int flag = POINTER_AS_INT(closure);
233  const int param = PyObject_IsTrue(value);
234 
235  if (param == -1) {
236  PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
237  return -1;
238  }
239 
240  if (param) {
241  G.debug |= flag;
242  }
243  else {
244  G.debug &= ~flag;
245  }
246 
247  return 0;
248 }
249 
251  bpy_app_global_flag_doc,
252  "Boolean, for application behavior (started with --enable-* matching this attribute name)");
253 static PyObject *bpy_app_global_flag_get(PyObject *UNUSED(self), void *closure)
254 {
255  const int flag = POINTER_AS_INT(closure);
256  return PyBool_FromLong(G.f & flag);
257 }
258 
259 static int bpy_app_global_flag_set(PyObject *UNUSED(self), PyObject *value, void *closure)
260 {
261  const int flag = POINTER_AS_INT(closure);
262  const int param = PyObject_IsTrue(value);
263 
264  if (param == -1) {
265  PyErr_SetString(PyExc_TypeError, "bpy.app.use_* can only be True/False");
266  return -1;
267  }
268 
269  if (param) {
270  G.f |= flag;
271  }
272  else {
273  G.f &= ~flag;
274  }
275 
276  return 0;
277 }
278 
280  PyObject *value,
281  void *closure)
282 {
283  const int param = PyObject_IsTrue(value);
284  if (param == 1) {
285  PyErr_SetString(PyExc_ValueError, "This bpy.app.use_* option can only be disabled");
286  return -1;
287  }
288  return bpy_app_global_flag_set(NULL, value, closure);
289 }
290 
291 PyDoc_STRVAR(bpy_app_debug_value_doc,
292  "Short, number which can be set to non-zero values for testing purposes");
293 static PyObject *bpy_app_debug_value_get(PyObject *UNUSED(self), void *UNUSED(closure))
294 {
295  return PyLong_FromLong(G.debug_value);
296 }
297 
298 static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure))
299 {
300  const short param = PyC_Long_AsI16(value);
301 
302  if (param == -1 && PyErr_Occurred()) {
303  PyC_Err_SetString_Prefix(PyExc_TypeError,
304  "bpy.app.debug_value can only be set to a whole number");
305  return -1;
306  }
307 
308  G.debug_value = param;
309 
311 
312  return 0;
313 }
314 
315 PyDoc_STRVAR(bpy_app_tempdir_doc, "String, the temp directory used by blender (read-only)");
316 static PyObject *bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure))
317 {
319 }
320 
322  bpy_app_driver_dict_doc,
323  "Dictionary for drivers namespace, editable in-place, reset on file load (read-only)");
324 static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(closure))
325 {
326  if (bpy_pydriver_Dict == NULL) {
327  if (bpy_pydriver_create_dict() != 0) {
328  PyErr_SetString(PyExc_RuntimeError, "bpy.app.driver_namespace failed to create dictionary");
329  return NULL;
330  }
331  }
332 
333  return Py_INCREF_RET(bpy_pydriver_Dict);
334 }
335 
336 PyDoc_STRVAR(bpy_app_preview_render_size_doc,
337  "Reference size for icon/preview renders (read-only)");
338 static PyObject *bpy_app_preview_render_size_get(PyObject *UNUSED(self), void *closure)
339 {
340  return PyLong_FromLong((long)UI_icon_preview_to_render_size(POINTER_AS_INT(closure)));
341 }
342 
343 static PyObject *bpy_app_autoexec_fail_message_get(PyObject *UNUSED(self), void *UNUSED(closure))
344 {
345  return PyC_UnicodeFromByte(G.autoexec_fail);
346 }
347 
348 static PyGetSetDef bpy_app_getsets[] = {
349  {"debug", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG},
350  {"debug_ffmpeg",
353  bpy_app_debug_doc,
354  (void *)G_DEBUG_FFMPEG},
355  {"debug_freestyle",
358  bpy_app_debug_doc,
359  (void *)G_DEBUG_FREESTYLE},
360  {"debug_python",
363  bpy_app_debug_doc,
364  (void *)G_DEBUG_PYTHON},
365  {"debug_events",
368  bpy_app_debug_doc,
369  (void *)G_DEBUG_EVENTS},
370  {"debug_handlers",
373  bpy_app_debug_doc,
374  (void *)G_DEBUG_HANDLERS},
375  {"debug_wm", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_WM},
376  {"debug_depsgraph",
379  bpy_app_debug_doc,
380  (void *)G_DEBUG_DEPSGRAPH},
381  {"debug_depsgraph_build",
384  bpy_app_debug_doc,
385  (void *)G_DEBUG_DEPSGRAPH_BUILD},
386  {"debug_depsgraph_eval",
389  bpy_app_debug_doc,
390  (void *)G_DEBUG_DEPSGRAPH_EVAL},
391  {"debug_depsgraph_tag",
394  bpy_app_debug_doc,
395  (void *)G_DEBUG_DEPSGRAPH_TAG},
396  {"debug_depsgraph_time",
399  bpy_app_debug_doc,
400  (void *)G_DEBUG_DEPSGRAPH_TIME},
401  {"debug_depsgraph_pretty",
404  bpy_app_debug_doc,
405  (void *)G_DEBUG_DEPSGRAPH_PRETTY},
406  {"debug_simdata",
409  bpy_app_debug_doc,
410  (void *)G_DEBUG_SIMDATA},
411  {"debug_io", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_IO},
412 
413  {"use_event_simulate",
416  bpy_app_global_flag_doc,
417  (void *)G_FLAG_EVENT_SIMULATE},
418 
419  {"use_userpref_skip_save_on_exit",
422  bpy_app_global_flag_doc,
424 
425  {"debug_value",
428  bpy_app_debug_value_doc,
429  NULL},
430  {"tempdir", bpy_app_tempdir_get, NULL, bpy_app_tempdir_doc, NULL},
431  {"driver_namespace", bpy_app_driver_dict_get, NULL, bpy_app_driver_dict_doc, NULL},
432 
433  {"render_icon_size",
435  NULL,
436  bpy_app_preview_render_size_doc,
437  (void *)ICON_SIZE_ICON},
438  {"render_preview_size",
440  NULL,
441  bpy_app_preview_render_size_doc,
442  (void *)ICON_SIZE_PREVIEW},
443 
444  /* security */
445  {"autoexec_fail", bpy_app_global_flag_get, NULL, NULL, (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL},
446  {"autoexec_fail_quiet",
448  NULL,
449  NULL,
451  {"autoexec_fail_message", bpy_app_autoexec_fail_message_get, NULL, NULL, NULL},
452 
453  /* End-of-list marker. */
454  {NULL, NULL, NULL, NULL, NULL},
455 };
456 
457 PyDoc_STRVAR(bpy_app_is_job_running_doc,
458  ".. staticmethod:: is_job_running(job_type)\n"
459  "\n"
460  " Check whether a job of the given type is running.\n"
461  "\n"
462  " :arg job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n"
463  " :type job_type: str\n"
464  " :return: Whether a job of the given type is currently running.\n"
465  " :rtype: bool.\n");
466 static PyObject *bpy_app_is_job_running(PyObject *UNUSED(self), PyObject *args, PyObject *kwds)
467 {
468  struct BPy_EnumProperty_Parse job_type_enum = {
470  .value = 0,
471  };
472  static const char *_keywords[] = {"job_type", NULL};
473  static _PyArg_Parser _parser = {
474  "O&" /* `job_type` */
475  ":is_job_running",
476  _keywords,
477  0,
478  };
479  if (!_PyArg_ParseTupleAndKeywordsFast(
480  args, kwds, &_parser, pyrna_enum_value_parse_string, &job_type_enum)) {
481  return NULL;
482  }
483  wmWindowManager *wm = G_MAIN->wm.first;
484  return PyBool_FromLong(WM_jobs_has_running_type(wm, job_type_enum.value));
485 }
486 
487 static struct PyMethodDef bpy_app_methods[] = {
488  {"is_job_running",
489  (PyCFunction)bpy_app_is_job_running,
490  METH_VARARGS | METH_KEYWORDS | METH_STATIC,
491  bpy_app_is_job_running_doc},
492  {NULL, NULL, 0, NULL},
493 };
494 
495 static void py_struct_seq_getset_init(void)
496 {
497  /* tricky dynamic members, not to py-spec! */
498  for (PyGetSetDef *getset = bpy_app_getsets; getset->name; getset++) {
499  PyObject *item = PyDescr_NewGetSet(&BlenderAppType, getset);
500  PyDict_SetItem(BlenderAppType.tp_dict, PyDescr_NAME(item), item);
501  Py_DECREF(item);
502  }
503 }
504 
505 static void py_struct_seq_method_init(void)
506 {
507  for (PyMethodDef *method = bpy_app_methods; method->ml_name; method++) {
508  BLI_assert_msg(method->ml_flags & METH_STATIC, "Only static methods make sense for 'bpy.app'");
509  PyObject *item = PyCFunction_New(method, NULL);
510  PyDict_SetItemString(BlenderAppType.tp_dict, method->ml_name, item);
511  Py_DECREF(item);
512  }
513 }
514 
515 /* end dynamic bpy.app */
516 
517 PyObject *BPY_app_struct(void)
518 {
519  PyObject *ret;
520 
521  PyStructSequence_InitType(&BlenderAppType, &app_info_desc);
522 
523  ret = make_app_info();
524 
525  /* prevent user from creating new instances */
526  BlenderAppType.tp_init = NULL;
527  BlenderAppType.tp_new = NULL;
528  BlenderAppType.tp_hash = (hashfunc)
529  _Py_HashPointer; /* without this we can't do set(sys.modules) T29635. */
530 
531  /* kindof a hack ontop of PyStructSequence */
534 
535  return ret;
536 }
const char * BKE_appdir_program_path(void)
Definition: appdir.c:867
#define BLENDER_VERSION_PATCH
#define BLENDER_VERSION_CYCLE
#define BLENDER_FILE_SUBVERSION
#define BLENDER_VERSION
#define BLENDER_FILE_VERSION
const char * BKE_blender_version_string(void)
Definition: blender.c:124
#define G_MAIN
Definition: BKE_global.h:267
@ G_DEBUG
Definition: BKE_global.h:174
@ G_DEBUG_HANDLERS
Definition: BKE_global.h:178
@ G_DEBUG_FREESTYLE
Definition: BKE_global.h:181
@ G_DEBUG_IO
Definition: BKE_global.h:194
@ G_DEBUG_SIMDATA
Definition: BKE_global.h:192
@ G_DEBUG_FFMPEG
Definition: BKE_global.h:175
@ G_DEBUG_DEPSGRAPH_PRETTY
Definition: BKE_global.h:187
@ G_DEBUG_DEPSGRAPH_TIME
Definition: BKE_global.h:185
@ G_DEBUG_DEPSGRAPH
Definition: BKE_global.h:190
@ G_DEBUG_DEPSGRAPH_EVAL
Definition: BKE_global.h:183
@ G_DEBUG_DEPSGRAPH_TAG
Definition: BKE_global.h:184
@ G_DEBUG_WM
Definition: BKE_global.h:179
@ G_DEBUG_EVENTS
Definition: BKE_global.h:177
@ G_DEBUG_PYTHON
Definition: BKE_global.h:176
@ G_DEBUG_DEPSGRAPH_BUILD
Definition: BKE_global.h:182
@ G_FLAG_EVENT_SIMULATE
Definition: BKE_global.h:151
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET
Definition: BKE_global.h:158
@ G_FLAG_USERPREF_NO_SAVE_ON_EXIT
Definition: BKE_global.h:152
@ G_FLAG_SCRIPT_AUTOEXEC_FAIL
Definition: BKE_global.h:157
#define BLI_assert_msg(a, msg)
Definition: BLI_assert.h:53
unsigned long ulong
Definition: BLI_sys_types.h:69
#define ARRAY_SIZE(arr)
#define STRINGIFY(x)
#define UNUSED(x)
#define POINTER_AS_INT(i)
ID and Library types, which are fundamental for sdna.
@ ICON_SIZE_PREVIEW
Definition: DNA_ID_enums.h:16
@ ICON_SIZE_ICON
Definition: DNA_ID_enums.h:15
int UI_icon_preview_to_render_size(enum eIconSizes size)
#define NC_WINDOW
Definition: WM_types.h:325
static void py_struct_seq_getset_init(void)
Definition: bpy_app.c:495
char build_type[]
Definition: buildinfo.c:38
char build_cflags[]
Definition: buildinfo.c:46
char build_hash[]
Definition: buildinfo.c:31
static PyStructSequence_Field app_info_fields[]
Definition: bpy_app.c:73
static PyObject * make_app_info(void)
Definition: bpy_app.c:132
static PyObject * bpy_app_is_job_running(PyObject *UNUSED(self), PyObject *args, PyObject *kwds)
Definition: bpy_app.c:466
static PyObject * bpy_app_global_flag_get(PyObject *UNUSED(self), void *closure)
Definition: bpy_app.c:253
char build_commit_date[]
Definition: buildinfo.c:33
static PyObject * bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(closure))
Definition: bpy_app.c:324
static PyObject * bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure))
Definition: bpy_app.c:316
#define SetBytesItem(str)
static PyGetSetDef bpy_app_getsets[]
Definition: bpy_app.c:348
static PyObject * bpy_app_debug_value_get(PyObject *UNUSED(self), void *UNUSED(closure))
Definition: bpy_app.c:293
static struct PyMethodDef bpy_app_methods[]
Definition: bpy_app.c:487
static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *closure)
Definition: bpy_app.c:230
static int bpy_app_global_flag_set__only_disable(PyObject *UNUSED(self), PyObject *value, void *closure)
Definition: bpy_app.c:279
char build_commit_time[]
Definition: buildinfo.c:34
char build_linkflags[]
Definition: buildinfo.c:48
char build_system[]
Definition: buildinfo.c:49
char build_branch[]
Definition: buildinfo.c:35
static void py_struct_seq_method_init(void)
Definition: bpy_app.c:505
static PyObject * bpy_app_preview_render_size_get(PyObject *UNUSED(self), void *closure)
Definition: bpy_app.c:338
#define SetIntItem(flag)
static PyObject * bpy_app_debug_get(PyObject *UNUSED(self), void *closure)
Definition: bpy_app.c:224
static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure))
Definition: bpy_app.c:298
char build_date[]
Definition: buildinfo.c:29
PyDoc_STRVAR(bpy_app_doc, "This module contains application values that remain unchanged during runtime.")
PyObject * BPY_app_struct(void)
Definition: bpy_app.c:517
char build_cxxflags[]
Definition: buildinfo.c:47
#define SetStrItem(str)
ulong build_commit_timestamp
Definition: buildinfo.c:32
static PyStructSequence_Desc app_info_desc
Definition: bpy_app.c:125
static int bpy_app_global_flag_set(PyObject *UNUSED(self), PyObject *value, void *closure)
Definition: bpy_app.c:259
char build_time[]
Definition: buildinfo.c:30
static PyTypeObject BlenderAppType
Definition: bpy_app.c:71
char build_platform[]
Definition: buildinfo.c:37
static PyObject * bpy_app_autoexec_fail_message_get(PyObject *UNUSED(self), void *UNUSED(closure))
Definition: bpy_app.c:343
#define SetObjItem(obj)
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)
Definition: bpy_app_ocio.c:81
PyObject * BPY_app_oiio_struct(void)
Definition: bpy_app_oiio.c:77
PyObject * BPY_app_opensubdiv_struct(void)
PyObject * BPY_app_openvdb_struct(void)
PyObject * BPY_app_sdl_struct(void)
Definition: bpy_app_sdl.c:114
PyObject * BPY_app_timers_module(void)
PyObject * BPY_app_translations_struct(void)
PyObject * BPY_app_usd_struct(void)
Definition: bpy_app_usd.c:78
PyObject * bpy_pydriver_Dict
Definition: bpy_driver.c:45
int bpy_pydriver_create_dict(void)
Definition: bpy_driver.c:51
uint pos
void * BKE_tempdir_session
#define G(x, y, z)
int pyrna_enum_value_parse_string(PyObject *o, void *p)
Definition: py_capi_rna.c:194
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(...)
Definition: py_capi_utils.h:88
return ret
const EnumPropertyItem rna_enum_wm_job_type_items[]
Definition: rna_wm.c:136
const struct EnumPropertyItem * items
Definition: py_capi_rna.h:58
void WM_main_add_notifier(unsigned int type, void *reference)
bool WM_jobs_has_running_type(const struct wmWindowManager *wm, int job_type)
Definition: wm_jobs.c:710