[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33626] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: fix for transform operator giving ' <UNKNOWN>' enum value when logged, now pass on the context for operator string representation.
Campbell Barton
ideasman42 at gmail.com
Mon Dec 13 07:54:30 CET 2010
Revision: 33626
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33626
Author: campbellbarton
Date: 2010-12-13 07:54:25 +0100 (Mon, 13 Dec 2010)
Log Message:
-----------
fix for transform operator giving '<UNKNOWN>' enum value when logged, now pass on the context for operator string representation.
Modified Paths:
--------------
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 2010-12-13 06:31:49 UTC (rev 33625)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 2010-12-13 06:54:25 UTC (rev 33626)
@@ -385,9 +385,10 @@
return wm_operator_call_internal(C, ot, NULL, NULL, context, TRUE);
}
-static void wm_operator_print(wmOperator *op)
+static void wm_operator_print(bContext *C, wmOperator *op)
{
- char *buf = WM_operator_pystring(NULL, op->type, op->ptr, 1);
+ /* context is needed for enum function */
+ char *buf = WM_operator_pystring(C, op->type, op->ptr, 1);
printf("%s\n", buf);
MEM_freeN(buf);
}
@@ -404,7 +405,7 @@
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 */
+ wm_operator_print(C, op); /* todo - this print may double up, might want to check more flags then the FINISHED */
if (op->type->flag & OPTYPE_REGISTER) {
/* Report the python string representation of the operator */
@@ -1289,7 +1290,7 @@
if (retval & OPERATOR_FINISHED)
if(G.f & G_DEBUG)
- wm_operator_print(handler->op);
+ wm_operator_print(C, handler->op);
/* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */
if(CTX_wm_manager(C) == wm && wm->op_undo_depth == 0)
More information about the Bf-blender-cvs
mailing list