Revision: 43088
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43088
Author:   campbellbarton
Date:     2012-01-03 02:26:32 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
fix [#29761] Texture painting with interpolation ignores use alpha
reporter - Shawn Zilbert (enigmatic) included patch.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/imagetexture.c

Modified: trunk/blender/source/blender/render/intern/source/imagetexture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/imagetexture.c    
2012-01-03 02:16:52 UTC (rev 43087)
+++ trunk/blender/source/blender/render/intern/source/imagetexture.c    
2012-01-03 02:26:32 UTC (rev 43088)
@@ -203,6 +203,13 @@
                ibuf->rect+= (ibuf->x*ibuf->y);
        }
 
+       /* keep this before interpolation [#29761] */
+       if (tex->imaflag & TEX_USEALPHA) {
+               if ((tex->imaflag & TEX_CALCALPHA) == 0) {
+                       texres->talpha = TRUE;
+               } 
+       }
+
        /* interpolate */
        if (tex->imaflag & TEX_INTERPOL) {
                float filterx, filtery;
@@ -225,11 +232,6 @@
                ibuf->rect-= (ibuf->x*ibuf->y);
        }
 
-       if(tex->imaflag & TEX_USEALPHA) {
-               if(tex->imaflag & TEX_CALCALPHA);
-               else texres->talpha= 1;
-       }
-       
        if(texres->nor) {
                if(tex->imaflag & TEX_NORMALMAP) {
                        // qdn: normal from color

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to