diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 09:34:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-08 09:34:06 +0300 |
commit | 6feb6235e1b4813763ee2852ecae1b03b08327f3 (patch) | |
tree | 0e85967aa5844d3b3da4c5fba1f9a6cca4dc8d31 /source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c | |
parent | 6f57d12e2e4a7d0e094bdfeb56cadd752fbe6207 (diff) |
WM: log message bus operations
Diffstat (limited to 'source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c')
-rw-r--r-- | source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c index 67b96f3d8b3..619777fc671 100644 --- a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c +++ b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c @@ -24,6 +24,10 @@ #include <stdio.h> + +#include "CLG_log.h" +#include "MEM_guardedalloc.h" + #include "DNA_ID.h" #include "BLI_utildefines.h" @@ -36,7 +40,6 @@ #include "RNA_access.h" -#include "MEM_guardedalloc.h" /* -------------------------------------------------------------------------- */ @@ -207,6 +210,15 @@ void WM_msg_publish_rna_params(struct wmMsgBus *mbus, const wmMsgParams_RNA *msg { wmMsgSubscribeKey_RNA *key; + const char *none = "<none>"; + CLOG_INFO( + WM_LOG_MSGBUS_PUB, 2, + "rna(id='%s', %s.%s)", + msg_key_params->ptr.id.data ? ((ID *)msg_key_params->ptr.id.data)->name : none, + msg_key_params->ptr.type ? RNA_struct_identifier(msg_key_params->ptr.type) : none, + msg_key_params->prop ? RNA_property_identifier((PropertyRNA *)msg_key_params->prop) : none + ); + if ((key = WM_msg_lookup_rna(mbus, msg_key_params))) { WM_msg_publish_with_key(mbus, &key->head); } @@ -261,6 +273,16 @@ void WM_msg_subscribe_rna_params( /* for lookup */ msg_key_test.msg.params = *msg_key_params; + const char *none = "<none>"; + CLOG_INFO( + WM_LOG_MSGBUS_SUB, 3, + "rna(id='%s', %s.%s, info='%s')", + msg_key_params->ptr.id.data ? ((ID *)msg_key_params->ptr.id.data)->name : none, + msg_key_params->ptr.type ? RNA_struct_identifier(msg_key_params->ptr.type) : none, + msg_key_params->prop ? RNA_property_identifier((PropertyRNA *)msg_key_params->prop) : none, + id_repr + ); + wmMsgSubscribeKey_RNA *msg_key = (wmMsgSubscribeKey_RNA *)WM_msg_subscribe_with_key( mbus, &msg_key_test.head, msg_val_params); |