Blender V5.3
bpy_app.cc File Reference
#include <Python.h>
#include "bpy_app.hh"
#include "bpy_app_alembic.hh"
#include "bpy_app_build_options.hh"
#include "bpy_app_ffmpeg.hh"
#include "bpy_app_ocio.hh"
#include "bpy_app_oiio.hh"
#include "bpy_app_opensubdiv.hh"
#include "bpy_app_openvdb.hh"
#include "bpy_app_sdl.hh"
#include "bpy_app_usd.hh"
#include "bpy_app_translations.hh"
#include "bpy_app_handlers.hh"
#include "bpy_capi_utils.hh"
#include "bpy_driver.hh"
#include "BPY_extern_python.hh"
#include "bpy_app_icons.hh"
#include "bpy_app_timers.hh"
#include "BLI_utildefines.hh"
#include "BKE_appdir.hh"
#include "BKE_blender_version.h"
#include "BKE_global.hh"
#include "BKE_main.hh"
#include "GPU_init_exit.hh"
#include "GPU_shader.hh"
#include "UI_interface_icons.hh"
#include "ED_undo.hh"
#include "MEM_guardedalloc.h"
#include "RNA_enum_types.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "../generic/py_capi_rna.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define SetIntItem(flag)
#define SetStrItem(str)
#define SetBytesItem(str)
#define SetObjItem(obj)

Functions

 blender::PyDoc_STRVAR (bpy_app_doc, "This module contains application values that remain unchanged during runtime.\n")
static PyObject * blender::make_app_info ()
 blender::PyDoc_STRVAR (bpy_app_debug_doc, "Boolean, for debug info " "(started with ``--debug`` / ``--debug-*`` matching this attribute name).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_app_debug_get (PyObject *, void *closure)
static int blender::bpy_app_debug_set (PyObject *, PyObject *value, void *closure)
 blender::PyDoc_STRVAR (bpy_app_internet_offline_doc, "Boolean, true when internet access is allowed by Blender & 3rd party scripts " "(read-only).\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_app_internet_offline_override_doc, "Boolean, true when internet access preference is overridden by the command line " "(read-only).\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_app_global_flag_doc, "Boolean, for application behavior " "(started with ``--enable-*`` matching this attribute name)\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_app_autoexec_doc, "Boolean, True when auto-execution is allowed (read-only).\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_app_autoexec_override_doc, "The auto-execution set by the command line, None when the preference isn't overridden " "(read-only).\n" "\n" ":type: bool | None\n")
 blender::PyDoc_STRVAR (bpy_app_autoexec_fail_doc, "Boolean, True when auto-execution of scripts failed (read-only).\n" "\n" ":type: bool\n")
 blender::PyDoc_STRVAR (bpy_app_autoexec_fail_quiet_doc, "Boolean, True when auto-execution failure should be quiet, set after the warning is shown " "once for the current blend file (read-only).\n" "\n" ":type: bool\n")
static PyObject * blender::bpy_app_global_flag_get (PyObject *, void *closure)
static PyObject * blender::bpy_app_autoexec_override_get (PyObject *, void *)
static int blender::bpy_app_global_flag_set (PyObject *, PyObject *value, void *closure)
static int blender::bpy_app_global_flag_set__only_disable (PyObject *, PyObject *value, void *closure)
 blender::PyDoc_STRVAR (bpy_app_debug_value_doc, "Integer value which can be set to non-zero values for testing purposes.\n" "\n" ":type: int\n")
static PyObject * blender::bpy_app_debug_value_get (PyObject *, void *)
static int blender::bpy_app_debug_value_set (PyObject *, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_app_tempdir_doc, "String, the temp directory used by blender (read-only).\n" "\n" ":type: str\n")
static PyObject * blender::bpy_app_tempdir_get (PyObject *, void *)
 blender::PyDoc_STRVAR (bpy_app_cachedir_doc, "String, the cache directory used by blender (read-only).\n" "\n" "In rare cases the default cache directory may not be available;\n" "in this case a temporary directory is used.\n" "\n" ":type: str\n")
static PyObject * blender::bpy_app_cachedir_get (PyObject *, void *)
 blender::PyDoc_STRVAR (bpy_app_driver_dict_doc, "Dictionary for drivers namespace, editable in-place, reset on file load (read-only).\n" "\n" ":type: dict[str, Any]\n")
static PyObject * blender::bpy_app_driver_dict_get (PyObject *, void *)
 blender::PyDoc_STRVAR (bpy_app_render_icon_size_doc, "Reference size for icon renders (read-only).\n" "\n" ":type: int\n")
 blender::PyDoc_STRVAR (bpy_app_render_preview_size_doc, "Reference size for preview renders (read-only).\n" "\n" ":type: int\n")
static PyObject * blender::bpy_app_render_preview_or_icon_size_get (PyObject *, void *closure)
 blender::PyDoc_STRVAR (bpy_app_autoexec_fail_message_doc, "String, message describing the auto-execution failure (read-only).\n" "\n" ":type: str\n")
static PyObject * blender::bpy_app_autoexec_fail_message_get (PyObject *, void *)
 blender::PyDoc_STRVAR (bpy_app_python_args_doc, "Leading arguments to use when calling Python directly (via ``sys.executable``). " "These arguments match settings Blender uses to " "ensure Python runs with a compatible environment (read-only).\n" "\n" ":type: tuple[str, ...]\n")
static PyObject * blender::bpy_app_python_args_get (PyObject *, void *)
 blender::PyDoc_STRVAR (bpy_app_binary_path_doc, "The location of Blender's executable, useful for utilities that open new instances. " "Read-only unless Blender is built as a Python module - in this case the value is " "an empty string which script authors may point to a Blender binary.\n" "\n" ":type: str\n")
static PyObject * blender::bpy_app_binary_path_get (PyObject *, void *)
static int blender::bpy_app_binary_path_set (PyObject *, PyObject *value, void *)
 blender::PyDoc_STRVAR (bpy_app_is_job_running_doc, ".. function:: is_job_running(job_type)\n" "\n" " Check whether a job of the given type is running.\n" "\n" " :param job_type: job type in :ref:`rna_enum_wm_job_type_items`.\n" " :type job_type: str\n" " :return: Whether a job of the given type is currently running.\n" " :rtype: bool\n")
static PyObject * blender::bpy_app_is_job_running (PyObject *, PyObject *args, PyObject *kwds)
 blender::PyDoc_STRVAR (bpy_app_help_text_doc, ".. function:: help_text(*, all=False)\n" "\n" " Return the help text as a string.\n" "\n" " :param all: Return all arguments, " "even those which aren't available for the current platform.\n" " :type all: bool\n" " :return: Help text.\n" " :rtype: str\n")
static PyObject * blender::bpy_app_help_text (PyObject *, PyObject *args, PyObject *kwds)
 blender::PyDoc_STRVAR (bpy_app_memory_usage_undo_doc, ".. function:: memory_usage_undo()\n" "\n" " Get undo memory usage information.\n" "\n" " :return: Memory usage of the undo stack in bytes.\n" " :rtype: int\n")
static PyObject * blender::bpy_app_memory_usage_undo (PyObject *, PyObject *)
static void blender::py_struct_seq_getset_init ()
static void blender::py_struct_seq_method_init ()
PyObject * blender::BPY_app_struct ()

Variables

char blender::build_date []
char blender::build_time []
ulong blender::build_commit_timestamp
char blender::build_commit_date []
char blender::build_commit_time []
char blender::build_hash []
char blender::build_branch []
char blender::build_platform []
char blender::build_type []
char blender::build_cflags []
char blender::build_cxxflags []
char blender::build_linkflags []
char blender::build_system []
static PyTypeObject blender::BlenderAppType
static PyStructSequence_Field blender::app_info_fields []
static PyStructSequence_Desc blender::app_info_desc
static PyGetSetDef blender::bpy_app_getsets []
static PyMethodDef blender::bpy_app_methods []

Detailed Description

This file defines a 'PyStructSequence' accessed via 'bpy.app', mostly exposing static applications variables such as version and buildinfo however some writable variables have been added such as 'debug' and 'tempdir'

Definition in file bpy_app.cc.

Macro Definition Documentation

◆ SetBytesItem

#define SetBytesItem ( str)
Value:
PyStructSequence_SET_ITEM(app_info, pos++, PyBytes_FromString(str))
#define str(s)

Referenced by blender::make_app_info().

◆ SetIntItem

#define SetIntItem ( flag)
Value:
PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))

Referenced by blender::make_app_info().

◆ SetObjItem

◆ SetStrItem

#define SetStrItem ( str)