|
Blender V5.0
|
#include "BLI_utildefines.h"#include <Python.h>#include "../generic/python_compat.hh"#include "BKE_callbacks.hh"#include "RNA_access.hh"#include "bpy_app_handlers.hh"#include "bpy_rna.hh"#include "BPY_extern.hh"Go to the source code of this file.
Macros | |
| #define | FILEPATH_SAVE_ARG |
| #define | FILEPATH_LOAD_ARG |
| #define | RENDER_STATS_ARG |
| #define | DEPSGRAPH_UPDATE_ARG |
| #define | RENDER_ARG |
| #define | OBJECT_BAKE_ARG |
| #define | COMPOSITE_ARG |
| #define | ANNOTATION_ARG |
| #define | BLENDIMPORT_ARG |
| #define | APP_CB_OTHER_FIELDS 1 |
Functions | |
| void | bpy_app_generic_callback (Main *main, PointerRNA **pointers, const int pointers_num, void *arg) |
| static PyObject * | make_app_cb_info () |
| PyObject * | BPY_app_handlers_struct () |
| void | BPY_app_handlers_reset (const bool do_all) |
| static PyObject * | choose_arguments (PyObject *func, PyObject *args_all, PyObject *args_single) |
Variables | |
| static PyTypeObject | BlenderAppCbType |
| static PyStructSequence_Field | app_cb_info_fields [] |
| static PyStructSequence_Desc | app_cb_info_desc |
| static PyObject * | py_cb_array [BKE_CB_EVT_TOT] = {nullptr} |
Permanent Tagging Code | |
| #define | PERMINENT_CB_ID "_bpy_persistent" |
| static PyTypeObject | BPyPersistent_Type |
| static PyObject * | bpy_app_handlers_persistent_new (PyTypeObject *, PyObject *args, PyObject *) |
This file defines a #PyStructSequence accessed via bpy.app.handlers, which exposes various lists that the script author can add callback functions into (called via blenders generic BLI_cb API)
Definition in file bpy_app_handlers.cc.
| #define ANNOTATION_ARG |
Definition at line 55 of file bpy_app_handlers.cc.
| #define APP_CB_OTHER_FIELDS 1 |
Referenced by make_app_cb_info().
| #define BLENDIMPORT_ARG |
Definition at line 58 of file bpy_app_handlers.cc.
| #define COMPOSITE_ARG |
Definition at line 52 of file bpy_app_handlers.cc.
| #define DEPSGRAPH_UPDATE_ARG |
Definition at line 43 of file bpy_app_handlers.cc.
| #define FILEPATH_LOAD_ARG |
Definition at line 37 of file bpy_app_handlers.cc.
| #define FILEPATH_SAVE_ARG |
Definition at line 34 of file bpy_app_handlers.cc.
| #define OBJECT_BAKE_ARG |
Definition at line 49 of file bpy_app_handlers.cc.
| #define PERMINENT_CB_ID "_bpy_persistent" |
Definition at line 151 of file bpy_app_handlers.cc.
Referenced by bpy_app_handlers_persistent_new(), and BPY_app_handlers_reset().
| #define RENDER_ARG |
Definition at line 46 of file bpy_app_handlers.cc.
| #define RENDER_STATS_ARG |
Definition at line 40 of file bpy_app_handlers.cc.
| void bpy_app_generic_callback | ( | Main * | main, |
| PointerRNA ** | pointers, | ||
| const int | pointers_num, | ||
| void * | arg ) |
Definition at line 377 of file bpy_app_handlers.cc.
References app_cb_info_fields, choose_arguments(), i, name, POINTER_AS_INT, pos, py_cb_array, Py_DECREF(), pyrna_struct_CreatePyObject_with_primitive_support(), and ret.
Referenced by BPY_app_handlers_struct().
|
static |
Definition at line 153 of file bpy_app_handlers.cc.
References PERMINENT_CB_ID.
| void BPY_app_handlers_reset | ( | const bool | do_all | ) |
Definition at line 314 of file bpy_app_handlers.cc.
References BKE_CB_EVT_TOT, i, PERMINENT_CB_ID, pos, py_cb_array, and Py_DECREF().
Referenced by BPY_python_reset().
|
nodiscard |
Definition at line 274 of file bpy_app_handlers.cc.
References bCallbackFuncStore::alloc, app_cb_info_desc, bCallbackFuncStore::arg, BKE_callback_add(), BKE_CB_EVT_TOT, BlenderAppCbType, BLI_assert_msg, bpy_app_generic_callback(), BPyPersistent_Type, bCallbackFuncStore::func, make_app_cb_info(), POINTER_FROM_INT, pos, Py_HashPointer, and ret.
Referenced by make_app_info().
|
static |
Definition at line 364 of file bpy_app_handlers.cc.
Referenced by bpy_app_generic_callback().
|
static |
Definition at line 248 of file bpy_app_handlers.cc.
References app_cb_info_fields, APP_CB_OTHER_FIELDS, BKE_CB_EVT_TOT, BlenderAppCbType, BPyPersistent_Type, name, pos, and py_cb_array.
Referenced by BPY_app_handlers_struct().
|
static |
Definition at line 134 of file bpy_app_handlers.cc.
Referenced by BPY_app_handlers_struct().
|
static |
See BKE_callbacks.hh eCbEvent declaration for the policy on naming.
Definition at line 65 of file bpy_app_handlers.cc.
Referenced by bpy_app_generic_callback(), and make_app_cb_info().
|
static |
Definition at line 32 of file bpy_app_handlers.cc.
Referenced by BPY_app_handlers_struct(), and make_app_cb_info().
|
static |
Dummy type because decorators can't be a #PyCFunction.
Definition at line 188 of file bpy_app_handlers.cc.
Referenced by BPY_app_handlers_struct(), and make_app_cb_info().
|
static |
Definition at line 246 of file bpy_app_handlers.cc.
Referenced by bpy_app_generic_callback(), BPY_app_handlers_reset(), and make_app_cb_info().