From ad0e57a2a8fc14192f61cb83e0eec5cd24cd2b25 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 9 Mar 2010 14:35:56 +0000 Subject: [PATCH] reproject - clamp image by the maximum texture size, remove debug printf. --- source/blender/editors/sculpt_paint/paint_image.c | 6 ++++++ source/blender/editors/transform/transform_input.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index a6df4243f60..faff64fc550 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5489,9 +5489,15 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) ToolSettings *settings= scene->toolsettings; int w= settings->imapaint.screen_grab_size[0]; int h= settings->imapaint.screen_grab_size[1]; + int maxsize; RNA_string_get(op->ptr, "filename", filename); + glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); + + if(w > maxsize) w= maxsize; + if(h > maxsize) h= maxsize; + ibuf= ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h); image= BKE_add_image_imbuf(ibuf); diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index d4110eedee0..e3386f1b1e7 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -270,8 +270,6 @@ void InputAngle(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) *angle += dphi; - printf("angle %.3f\n", *angle); - output[0] = *angle; }