Don't report the python code for operators type which don't have the
authorMatt Ebb <matt@mke3.net>
Sun, 6 Jun 2010 08:52:33 +0000 (08:52 +0000)
committerMatt Ebb <matt@mke3.net>
Sun, 6 Jun 2010 08:52:33 +0000 (08:52 +0000)
'REGISTER' flag set.

source/blender/windowmanager/intern/wm_event_system.c

index b55c68ce0292d4881a706ac80b24dc22c4877d4d..95c121e7a1fb1bfb486bcc8fef58475b218f075d 100644 (file)
@@ -392,11 +392,13 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop
        if(retval & OPERATOR_FINISHED) {
                if(G.f & G_DEBUG)
                        wm_operator_print(op); /* todo - this print may double up, might want to check more flags then the FINISHED */
-                       
-               /* Report the python string representation of the operator */
-               buf = WM_operator_pystring(C, op->type, op->ptr, 1);
-               BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
-               MEM_freeN(buf);
+               
+               if (op->type->flag & OPTYPE_REGISTER) {
+                       /* Report the python string representation of the operator */
+                       buf = WM_operator_pystring(C, op->type, op->ptr, 1);
+                       BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf);
+                       MEM_freeN(buf);
+               }
        }
 
        if (op->reports->list.first) {