[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45217] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: Fix related to #30674: 2D image painting would do unnecessary full GL texture
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Mar 27 19:19:18 CEST 2012
Revision: 45217
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45217
Author: blendix
Date: 2012-03-27 17:19:13 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Fix related to #30674: 2D image painting would do unnecessary full GL texture
delete at the end of the stroke, even when doing partial updates.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-03-27 13:52:30 UTC (rev 45216)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2012-03-27 17:19:13 UTC (rev 45217)
@@ -4726,10 +4726,10 @@
short restore_projection;
} PaintOperation;
-static void paint_redraw(bContext *C, ImagePaintState *s, int final)
+static void paint_redraw(bContext *C, ImagePaintState *s, int texpaint, int final)
{
if (final) {
- if (s->image)
+ if (s->image && !(texpaint || (s->sima && s->sima->lock)))
GPU_free_image(s->image);
/* compositor listener deals with updating */
@@ -4938,7 +4938,7 @@
}
if (redraw)
- paint_redraw(C, &pop->s, 0);
+ paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 0);
pop->first= 0;
}
@@ -4977,7 +4977,7 @@
project_paint_end(&pop->ps);
}
- paint_redraw(C, &pop->s, 1);
+ paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 1);
undo_paint_push_end(UNDO_PAINT_IMAGE);
if (pop->s.warnmultifile)
More information about the Bf-blender-cvs
mailing list