From 7a8ac1b09b1cf321f259b8eb9b832424d2c7bf5b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Nov 2017 19:43:34 +1100 Subject: WM: message bus replacement for property notifiers Use dynamically generated message publish/subscribe so buttons and manipulators update properly. This resolves common glitches where manipulators weren't updating as well as the UI when add-ons exposed properties which hard coded listeners weren't checking for. Python can also publish/scribe changes via `bpy.msgbus`. See D2917 --- source/blender/python/intern/bpy.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/python/intern/bpy.c') diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index edb4b3ec0ec..0b791b6acaa 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -58,6 +58,7 @@ /* external util modules */ #include "../generic/idprop_py_api.h" +#include "bpy_msgbus.h" #ifdef WITH_FREESTYLE # include "BPy_Freestyle.h" @@ -350,6 +351,7 @@ void BPy_init_modules(void) PyModule_AddObject(mod, "app", BPY_app_struct()); PyModule_AddObject(mod, "_utils_units", BPY_utils_units()); PyModule_AddObject(mod, "_utils_previews", BPY_utils_previews_module()); + PyModule_AddObject(mod, "msgbus", BPY_msgbus_module()); /* bpy context */ RNA_pointer_create(NULL, &RNA_Context, (void *)BPy_GetContext(), &ctx_ptr); -- cgit v1.2.3