[Bf-blender-cvs] [f28269fdfbd] soc-2020-info-editor: Report unregistered operators
Mateusz GrzeliÅski
noreply at git.blender.org
Fri Jul 31 12:51:11 CEST 2020
Commit: f28269fdfbddd9ae111d6820848b85a85cef1fd4
Author: Mateusz Grzeliński
Date: Fri Jul 31 12:36:33 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBf28269fdfbddd9ae111d6820848b85a85cef1fd4
Report unregistered operators
===================================================================
M source/blender/windowmanager/intern/wm_event_system.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 610887d740d..c5825ccb962 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -853,20 +853,19 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool ca
}
if (retval & OPERATOR_FINISHED) {
- CLOG_STR_INFO_N(WM_LOG_OPERATORS, WM_operator_pystring(C, op, false, true));
-
if (caller_owns_reports == false) {
CLOG_STR_VERBOSE_N(WM_LOG_OPERATORS, 1, BKE_reports_sprintfN(op->reports, 0));
}
+ char *buf = WM_operator_pystring(C, op, false, true);
if (op->type->flag & OPTYPE_REGISTER) {
- if (G.background == 0) { /* ends up printing these in the terminal, gets annoying */
- /* Report the python string representation of the operator */
- char *buf = WM_operator_pystring(C, op, false, true);
- BKE_report_format(CTX_wm_reports(C), RPT_OPERATOR, RPT_PYTHON, buf);
- MEM_freeN(buf);
- }
+ /* Report the python string representation of the operator */
+ BKE_report_format(CTX_wm_reports(C), RPT_OPERATOR, RPT_PYTHON, buf);
+ }
+ else {
+ BKE_report_format(CTX_wm_reports(C), RPT_OPERATOR_UNREGISTERED, RPT_PYTHON, buf);
}
+ MEM_freeN(buf);
}
/* Refresh Info Editor with reports immediately, even if op returned OPERATOR_CANCELLED. */
More information about the Bf-blender-cvs
mailing list