Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-13 09:54:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-13 09:54:25 +0300
commit39e3a759789d493073580b04fe9c6b811321c7f6 (patch)
tree82b2967337977339e77311afd9be36855bfd1e9f /source/blender/windowmanager
parent1474b32456f26ead36b50d787d99f9b1769b27e8 (diff)
fix for transform operator giving '<UNKNOWN>' enum value when logged, now pass on the context for operator string representation.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 8be7cc2d702..579bac52306 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -385,9 +385,10 @@ int WM_operator_poll_context(bContext *C, wmOperatorType *ot, int context)
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 @@ 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 */
+ 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 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
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)