Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_msgbus.c
| Show All 13 Lines | |||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup pythonintern | * \ingroup pythonintern | ||||
| * This file defines '_bpy_msgbus' module, exposed as 'bpy.msgbus'. | * This file defines '_bpy_msgbus' module, exposed as 'bpy.msgbus'. | ||||
| */ | */ | ||||
| #include <CLG_log.h> | |||||
| #include <MEM_guardedalloc.h> | |||||
| #include <Python.h> | #include <Python.h> | ||||
| #include "../generic/py_capi_utils.h" | #include "../generic/py_capi_utils.h" | ||||
| #include "../generic/python_utildefines.h" | #include "../generic/python_utildefines.h" | ||||
| #include "../mathutils/mathutils.h" | #include "../mathutils/mathutils.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| ▲ Show 20 Lines • Show All 270 Lines • ▼ Show 20 Lines | /* owner can be anything. */ | ||||
| msg_val_params.user_data = user_data; | msg_val_params.user_data = user_data; | ||||
| } | } | ||||
| msg_val_params.notify = bpy_msgbus_notify; | msg_val_params.notify = bpy_msgbus_notify; | ||||
| msg_val_params.free_data = bpy_msgbus_subscribe_value_free_data; | msg_val_params.free_data = bpy_msgbus_subscribe_value_free_data; | ||||
| WM_msg_subscribe_rna_params(mbus, &msg_key_params, &msg_val_params, __func__); | WM_msg_subscribe_rna_params(mbus, &msg_key_params, &msg_val_params, __func__); | ||||
| if (0) { /* For debugging. */ | CLOG_STR_VERBOSE_N(WM_LOG_MSGBUS_SUB, 4, WM_msg_sprintN(mbus)); | ||||
| WM_msg_dump(mbus, __func__); | |||||
| } | |||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR( | ||||
| bpy_msgbus_publish_rna_doc, | bpy_msgbus_publish_rna_doc, | ||||
| ".. function:: publish_rna(key)\n" | ".. function:: publish_rna(key)\n" | ||||
| "\n" BPY_MSGBUS_RNA_MSGKEY_DOC | "\n" BPY_MSGBUS_RNA_MSGKEY_DOC | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||