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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2006-12-23 17:26:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-12-23 17:26:08 +0300
commit6d4aadaa5f88df0a116de97b617f7e680ca28826 (patch)
tree460b843196f899a8d140cf2ee4e9cd790d496870 /source/blender/src/imagepaint.c
parent2933f6b9e6ab243bdbef3d3ed51c8e51aca0851d (diff)
Addition to last imagepaint fix. Not only can image be NULL, but also
it cannot be assumed that an image window exists, when doing 3d texture painting.
Diffstat (limited to 'source/blender/src/imagepaint.c')
-rw-r--r--source/blender/src/imagepaint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c
index 99ace881f7e..7bc6f5d88f6 100644
--- a/source/blender/src/imagepaint.c
+++ b/source/blender/src/imagepaint.c
@@ -233,7 +233,8 @@ static void imapaint_image_update(Image *image, ImBuf *ibuf, short texpaint)
}
}
-/* note; gets called with Image == NULL for brushes */
+/* note; gets called for both 2d image paint and 3d texture paint. in the
+ latter case image may be NULL and G.sima may not exist */
static void imapaint_redraw(int final, int texpaint, Image *image)
{
if(final) {
@@ -246,13 +247,13 @@ static void imapaint_redraw(int final, int texpaint, Image *image)
}
allqueue(REDRAWHEADERS, 0);
- if(image) {
+ if(!texpaint && image) {
/* after paint, tag Image or RenderResult nodes changed */
if(G.scene->nodetree) {
imagepaint_composite_tags(G.scene->nodetree, image, &G.sima->iuser);
}
/* signal composite (hurmf, need an allqueue?) */
- if(!texpaint && G.sima->lock) {
+ if(G.sima->lock) {
ScrArea *sa;
for(sa=G.curscreen->areabase.first; sa; sa= sa->next) {
if(sa->spacetype==SPACE_NODE) {
@@ -735,7 +736,6 @@ void imagepaint_paint(short mousebutton, short texpaint)
brush_painter_free(painter);
imapaint_redraw(1, texpaint, s.image);
-
if (texpaint) {
if (s.warnmultifile)