reproject - clamp image by the maximum texture size, remove debug printf.

This commit is contained in:
Campbell Barton 2010-03-09 14:35:56 +00:00
parent 5f7bcee541
commit ad0e57a2a8
2 changed files with 6 additions and 2 deletions

@ -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);

@ -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;
}