From 38aacb92f32ef5ea80a5e9b4b7b2757a6cc4b8bf Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Fri, 22 Jan 2010 06:48:29 +0000 Subject: Cleaned up some printfs in editors/ - converted some to reports, hid others behind G_DEBUG. --- source/blender/editors/animation/keyframing.c | 4 ++-- source/blender/editors/armature/editarmature.c | 12 +++++----- source/blender/editors/armature/poselib.c | 3 ++- source/blender/editors/curve/editcurve.c | 3 ++- .../blender/editors/interface/interface_handlers.c | 4 ---- source/blender/editors/interface/interface_icons.c | 26 ++++++++++++++-------- source/blender/editors/interface/interface_style.c | 6 +++-- source/blender/editors/interface/view2d.c | 3 ++- source/blender/editors/mesh/editmesh_add.c | 3 ++- source/blender/editors/mesh/editmesh_lib.c | 2 +- source/blender/editors/mesh/editmesh_loop.c | 1 - source/blender/editors/object/object_relations.c | 3 ++- source/blender/editors/object/object_vgroup.c | 3 ++- source/blender/editors/physics/particle_object.c | 4 +++- source/blender/editors/screen/area.c | 3 ++- source/blender/editors/screen/screen_edit.c | 3 ++- source/blender/editors/screen/screen_ops.c | 18 ++++++++++----- source/blender/editors/screen/screendump.c | 16 ++++++++----- source/blender/editors/space_image/image_ops.c | 2 +- source/blender/editors/space_node/node_edit.c | 9 +++++--- .../blender/editors/space_view3d/view3d_buttons.c | 8 ++++--- .../blender/editors/space_view3d/view3d_toolbar.c | 6 +++-- 22 files changed, 90 insertions(+), 52 deletions(-) (limited to 'source') diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 6d8938d9545..e042d2731fd 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1051,7 +1051,7 @@ static int insert_key_exec (bContext *C, wmOperator *op) /* try to insert keyframes for the channels specified by KeyingSet */ success= modify_keyframes(scene, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); if (G.f & G_DEBUG) - printf("KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); + BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); /* report failure or do updates? */ if (success) { @@ -1320,7 +1320,7 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op) } } - printf("Ob '%s' - Successfully removed %d keyframes \n", id->name+2, success); + BKE_reportf(op->reports, RPT_INFO, "Ob '%s' - Successfully removed %d keyframes \n", id->name+2, success); ob->recalc |= OB_RECALC_OB; } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index cf7cd3e1f27..8d6fa3ba020 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -320,7 +320,8 @@ void ED_armature_from_edit(Object *obedit) if (fBone->parent==eBone) fBone->parent= eBone->parent; } - printf("Warning: removed zero sized bone: %s\n", eBone->name); + if (G.f & G_DEBUG) + printf("Warning: removed zero sized bone: %s\n", eBone->name); bone_free(arm, eBone); } } @@ -3006,8 +3007,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) } else { // FIXME.. figure out a method for multiple bones - BKE_report(op->reports, RPT_ERROR, "Too many points selected"); - printf("Points selected: %d \n", count); + BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d \n", count); BLI_freelistN(&points); return OPERATOR_CANCELLED; } @@ -3047,8 +3047,10 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone /* check if same bone */ if (start == end) { - printf("Error: same bone! \n"); - printf("\tstart = %s, end = %s \n", start->name, end->name); + if (G.f & G_DEBUG) { + printf("Error: same bone! \n"); + printf("\tstart = %s, end = %s \n", start->name, end->name); + } } /* step 1: add a new bone diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index f4cf907ed4b..17d82521a6e 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -1303,7 +1303,8 @@ static void poselib_preview_init_data (bContext *C, wmOperator *op) if (pld->act->markers.first) { /* just use first one then... */ pld->marker= pld->act->markers.first; - if (pose_index > -2) printf("PoseLib had no active pose\n"); + if (pose_index > -2) + BKE_report(op->reports, RPT_WARNING, "PoseLib had no active pose"); } else { BKE_report(op->reports, RPT_ERROR, "PoseLib has no poses to preview/apply"); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 948448411bf..69018b049c2 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1004,7 +1004,8 @@ static void adduplicateflagNurb(Object *obedit, short flag) } } if(newu==0 || newv==0) { - printf("Can't duplicate Nurb\n"); + if (G.f & G_DEBUG) + printf("Can't duplicate Nurb\n"); } else { diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 37d5191691a..ab41ac48ff2 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -684,23 +684,19 @@ static void ui_add_link(uiBut *from, uiBut *to) if( (line= ui_is_a_link(from, to)) ) { line->flag |= UI_SELECT; ui_delete_active_linkline(from->block); - printf("already exists, means deletion now\n"); return; } if (from->type==INLINK && to->type==INLINK) { - printf("cannot link\n"); return; } else if (from->type==LINK && to->type==INLINK) { if( from->link->tocode != (int)to->hardmin ) { - printf("cannot link\n"); return; } } else if(from->type==INLINK && to->type==LINK) { if( to->link->tocode == (int)from->hardmin ) { - printf("cannot link\n"); return; } } diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 43c8b0b2c74..296b1e3ca57 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -50,6 +50,7 @@ #include "DNA_userdef_types.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_image.h" #include "BKE_icons.h" #include "BKE_utildefines.h" @@ -474,7 +475,8 @@ static void init_internal_icons() if (BLI_exists(iconfilestr)) { bbuf = IMB_loadiffname(iconfilestr, IB_rect); if(bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H) { - printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr); + if (G.f & G_DEBUG) + printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr); IMB_freeImBuf(bbuf); bbuf= NULL; } @@ -694,7 +696,8 @@ int UI_icon_get_width(int icon_id) icon = BKE_icon_get(icon_id); if (!icon) { - printf("UI_icon_get_width: Internal error, no icon for icon ID: %d\n", icon_id); + if (G.f & G_DEBUG) + printf("UI_icon_get_width: Internal error, no icon for icon ID: %d\n", icon_id); return 0; } @@ -718,7 +721,8 @@ int UI_icon_get_height(int icon_id) icon = BKE_icon_get(icon_id); if (!icon) { - printf("UI_icon_get_height: Internal error, no icon for icon ID: %d\n", icon_id); + if (G.f & G_DEBUG) + printf("UI_icon_get_height: Internal error, no icon for icon ID: %d\n", icon_id); return 0; } @@ -757,7 +761,8 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel) unsigned int size = preview_render_size(miplevel); if (!prv_img) { - printf("Error: requested preview image does not exist"); + if (G.f & G_DEBUG) + printf("Error: requested preview image does not exist"); } if (!prv_img->rect[miplevel]) { prv_img->w[miplevel] = size; @@ -772,7 +777,8 @@ static void icon_create_mipmap(struct PreviewImage* prv_img, int miplevel) static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, int miplevel) { if (!prv_img) { - printf("No preview image for this ID: %s\n", id->name); + if (G.f & G_DEBUG) + printf("No preview image for this ID: %s\n", id->name); return; } @@ -802,13 +808,14 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, /* draw */ if((w<1 || h<1)) { // XXX - TODO 2.5 verify whether this case can happen - // and only print in debug - printf("what the heck! - icons are %i x %i pixels?\n", w, h); + if (G.f & G_DEBUG) + printf("what the heck! - icons are %i x %i pixels?\n", w, h); } /* rect contains image in 'rendersize', we only scale if needed */ else if(rw!=w && rh!=h) { if(w>2000 || h>2000) { /* something has gone wrong! */ - printf("insane icon size w=%d h=%d\n",w,h); + if (G.f & G_DEBUG) + printf("insane icon size w=%d h=%d\n",w,h); } else { ImBuf *ima; @@ -891,7 +898,8 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al icon = BKE_icon_get(icon_id); if (!icon) { - printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id); + if (G.f & G_DEBUG) + printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id); return; } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 2e8d2a8cb2b..c80db9a1588 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -291,8 +291,10 @@ void uiStyleInit(void) font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); } - if (font->blf_id == -1) - printf("uiStyleInit error, no fonts available\n"); + if (font->blf_id == -1) { + if (G.f & G_DEBUG) + printf("uiStyleInit error, no fonts available\n"); + } else { BLF_set(font->blf_id); /* ? just for speed to initialize? diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index cba314b0bf3..c5e81e237c9 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -838,7 +838,8 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz height -= V2D_SCROLL_HEIGHT; if (ELEM3(0, v2d, width, height)) { - printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", v2d, width, height); // XXX temp debug info + if (G.f & G_DEBUG) + printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", v2d, width, height); // XXX temp debug info return; } diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 1f815aa18fa..b79b840eac0 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -766,7 +766,8 @@ static void addedgeface_mesh(EditMesh *em, wmOperator *op) else if( convex(neweve[0]->co, neweve[3]->co, neweve[1]->co, neweve[2]->co) ) { efa= addfacelist(em, neweve[0], neweve[3], neweve[1], neweve[2], NULL, NULL); } - else printf("cannot find nice quad from concave set of vertices\n"); + else BKE_report(op->reports, RPT_ERROR, "cannot find nice quad from concave set of vertices"); + } } } diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index 69043d9fa98..b3e96729201 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -432,7 +432,7 @@ void EM_select_face_fgon(EditMesh *em, EditFace *efa, int val) if(efa->e3->fgoni) index= efa->e3->fgoni; if(efa->v4 && efa->e4->fgoni) index= efa->e4->fgoni; - if(index==0) printf("wrong fgon select\n"); + if((index==0) && (G.f & G_DEBUG))printf("wrong fgon select\n"); // select all ngon faces with index for(efa= em->faces.first; efa; efa= efa->next) { diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index ea444b2d014..2cd5f221ebe 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -682,7 +682,6 @@ static int knife_cut_exec(bContext *C, wmOperator *op) if (isect!=0.0f) eed->f2= 1; else eed->f2=0; eed->tmp.fp= isect; - //printf("isect=%i\n", isect); } else { eed->f2=0; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index fbee03e3a30..3a7ab3a101d 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1397,7 +1397,8 @@ void single_obdata_users(Scene *scene, int flag) armature_rebuild_pose(ob, ob->data); break; default: - printf("ERROR single_obdata_users: can't copy %s\n", id->name); + if (G.f & G_DEBUG) + printf("ERROR single_obdata_users: can't copy %s\n", id->name); return; } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 23411d2219f..20241f16c4f 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -543,7 +543,8 @@ static void vgroup_duplicate(Object *ob) BLI_snprintf(name, 32, "%s_copy", dg->name); while(get_named_vertexgroup(ob, name)) { if((strlen(name) + 6) > 32) { - printf("Internal error: the name for the new vertex group is > 32 characters"); + if (G.f & G_DEBUG) + printf("Internal error: the name for the new vertex group is > 32 characters"); return; } strcpy(s, name); diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index f94835593c5..e567c940546 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -44,6 +44,7 @@ #include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" +#include "BKE_global.h" #include "BKE_main.h" #include "BKE_particle.h" #include "BKE_pointcache.h" @@ -654,7 +655,8 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree); if(nearest.index == -1) { - printf("No nearest point found for hair root!"); + if (G.f & G_DEBUG) + printf("No nearest point found for hair root!"); continue; } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 7fb4dd57672..a7a3754d16f 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -728,7 +728,8 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int if(count!=4) { /* let's stop adding regions */ BLI_init_rcti(remainder, 0, 0, 0, 0); - printf("region quadsplit failed\n"); + if (G.f & G_DEBUG) + printf("region quadsplit failed\n"); } else quad= 1; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 20c629ab69c..786f9ee9e3f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1473,7 +1473,8 @@ ScrArea *ed_screen_fullarea(bContext *C, wmWindow *win, ScrArea *sa) for(old= sc->areabase.first; old; old= old->next) if(old->full) break; if(old==NULL) { - printf("something wrong in areafullscreen\n"); + if (G.f & G_DEBUG) + printf("something wrong in areafullscreen\n"); return NULL; } // old feature described below (ton) diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 0b26b531d89..ef559615e2b 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2268,7 +2268,6 @@ static int header_flip_exec(bContext *C, wmOperator *op) #endif WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); - printf("executed header region flip\n"); return OPERATOR_FINISHED; } @@ -2946,7 +2945,8 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str) /* very weak... but 512 characters is quite safe */ if(spos >= str+IMA_RW_MAXTEXT) - printf("WARNING! renderwin text beyond limit \n"); + if (G.f & G_DEBUG) + printf("WARNING! renderwin text beyond limit \n"); } @@ -3484,15 +3484,23 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) if(ibuf) { if(BKE_imtype_is_movie(scene->r.imtype)) { ok= oglrender->mh->append_movie(&scene->r, CFRA, (int*)ibuf->rect, oglrender->sizex, oglrender->sizey, oglrender->reports); - if(ok) + if(ok) { printf("Append frame %d", scene->r.cfra); + BKE_reportf(op->reports, RPT_INFO, "Appended frame: %d", scene->r.cfra); + } } else { BKE_makepicstring(name, scene->r.pic, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION); ok= BKE_write_ibuf(scene, ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality); - if(ok==0) printf("write error: cannot save %s\n", name); - else printf("saved: %s", name); + if(ok==0) { + printf("Write error: cannot save %s\n", name); + BKE_reportf(op->reports, RPT_ERROR, "Write error: cannot save %s", name); + } + else { + printf("Saved: %s", name); + BKE_reportf(op->reports, RPT_INFO, "Saved file: %s", name); + } } } diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index a756eff8c11..6f2052958ce 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -249,9 +249,10 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update) if(sj->dumprect) { if(mh) { - if(mh->append_movie(&rd, cfra, (int *)sj->dumprect, sj->dumpsx, sj->dumpsy, &sj->reports)) - printf("Append frame %d\n", cfra); - else + if(mh->append_movie(&rd, cfra, (int *)sj->dumprect, sj->dumpsx, sj->dumpsy, &sj->reports)) { + BKE_reportf(&sj->reports, RPT_INFO, "Appended frame: %d", cfra); + printf("Appended frame %d\n", cfra); + } else break; } else { @@ -266,9 +267,13 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update) if(ok==0) { printf("Write error: cannot save %s\n", name); + BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s\n", name); break; } - else printf("Saved: %s\n", name); + else { + printf("Saved file: %s\n", name); + BKE_reportf(&sj->reports, RPT_INFO, "Saved file: %s", name); + } /* imbuf knows which rects are not part of ibuf */ IMB_freeImBuf(ibuf); @@ -288,7 +293,8 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update) if(mh) mh->end_movie(); - printf("screencast job stopped\n"); + + BKE_report(&sj->reports, RPT_INFO, "Screencast job stopped"); } static int screencast_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 6b901814634..b730f075f8f 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1079,7 +1079,7 @@ static int save_sequence_exec(bContext *C, wmOperator *op) break; } - printf("Saved: %s\n", ibuf->name); + BKE_reportf(op->reports, RPT_INFO, "Saved: %s\n", ibuf->name); ibuf->userflags &= ~IB_BITMAPDIRTY; } } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index aba262bf92b..f77eeec9cc8 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -242,7 +242,8 @@ void ED_node_shader_default(Material *ma) /* but lets check it anyway */ if(ma->nodetree) { - printf("error in shader initialize\n"); + if (G.f & G_DEBUG) + printf("error in shader initialize\n"); return; } @@ -272,7 +273,8 @@ void ED_node_composit_default(Scene *sce) /* but lets check it anyway */ if(sce->nodetree) { - printf("error in composit initialize\n"); + if (G.f & G_DEBUG) + printf("error in composite initialize\n"); return; } @@ -306,7 +308,8 @@ void ED_node_texture_default(Tex *tx) /* but lets check it anyway */ if(tx->nodetree) { - printf("error in texture initialize\n"); + if (G.f & G_DEBUG) + printf("error in texture initialize\n"); return; } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 5ca10de8456..079db41f8c8 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -203,7 +203,7 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d max+= BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr); if(max<320) strcat(defstr, str); } - else printf("oh no!\n"); + if(tfp->curdef==dvert->dw[i].def_nr) { init= 0; tfp->defweightp= &dvert->dw[i].weight; @@ -1135,11 +1135,13 @@ static void redo_cb(bContext *C, void *arg_op, void *arg2) if(lastop) { int retval; - printf("operator redo %s\n", lastop->type->name); + if (G.f & G_DEBUG) + printf("operator redo %s\n", lastop->type->name); ED_undo_pop(C); retval= WM_operator_repeat(C, lastop); if((retval & OPERATOR_FINISHED)==0) { - printf("operator redo failed %s\n", lastop->type->name); + if (G.f & G_DEBUG) + printf("operator redo failed %s\n", lastop->type->name); ED_undo_redo(C); } } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index eb292b4bccc..8d354c1b565 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -108,11 +108,13 @@ static void redo_cb(bContext *C, void *arg_op, void *arg2) if(lastop) { int retval; - printf("operator redo %s\n", lastop->type->name); + if (G.f & G_DEBUG) + printf("operator redo %s\n", lastop->type->name); ED_undo_pop_op(C, lastop); retval= WM_operator_repeat(C, lastop); if((retval & OPERATOR_FINISHED)==0) { - printf("operator redo failed %s\n", lastop->type->name); + if (G.f & G_DEBUG) + printf("operator redo failed %s\n", lastop->type->name); ED_undo_redo(C); } } -- cgit v1.2.3