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-03-09 17:35:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-09 17:35:56 +0300
commitad0e57a2a8fc14192f61cb83e0eec5cd24cd2b25 (patch)
treee51542331025dd4946a4868db400b6f9c1326604 /source/blender/editors/sculpt_paint
parent5f7bcee541131be75b82e6d57dcc2ecc89303dd3 (diff)
reproject - clamp image by the maximum texture size, remove debug printf.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
1 files changed, 6 insertions, 0 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);