reproject - clamp image by the maximum texture size, remove debug printf.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 9 Mar 2010 14:35:56 +0000 (14:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 9 Mar 2010 14:35:56 +0000 (14:35 +0000)
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/transform/transform_input.c

index a6df4243f60b176d98c1e88ed4640e5ea63503a2..faff64fc550051e455e01d9d440db76961011efa 100644 (file)
@@ -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);
 
index d4110eedee05a39cef804452d4015cd86eee3b22..e3386f1b1e7ea633972c08352791f5dd2ee11253 100644 (file)
@@ -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;
 }