Revision: 17527
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17527
Author:   campbellbarton
Date:     2008-11-21 07:17:26 +0100 (Fri, 21 Nov 2008)

Log Message:
-----------
* smudge tool wanst working (forgot to set the precious mouse location)
* VecWeightf and Vec2Weightf didnt have return types defined.

Modified Paths:
--------------
    branches/projection-paint/source/blender/src/imagepaint.c

Modified: branches/projection-paint/source/blender/src/imagepaint.c
===================================================================
--- branches/projection-paint/source/blender/src/imagepaint.c   2008-11-21 
03:09:48 UTC (rev 17526)
+++ branches/projection-paint/source/blender/src/imagepaint.c   2008-11-21 
06:17:26 UTC (rev 17527)
@@ -591,14 +591,14 @@
        }
 }
 
-static VecWeightf(float p[3], float v1[3], float v2[3], float v3[3], float 
w[3])
+static void VecWeightf(float p[3], float v1[3], float v2[3], float v3[3], 
float w[3])
 {
        p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
        p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
        p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2];
 }
 
-static Vec2Weightf(float p[3], float v1[3], float v2[3], float v3[3], float 
w[3])
+static void Vec2Weightf(float p[3], float v1[3], float v2[3], float v3[3], 
float w[3])
 {
        p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2];
        p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2];
@@ -3409,7 +3409,7 @@
                                                         * the fact that 
applying the color directly gives feedback,
                                                         * instead, collect the 
colors and apply after :/ */
                                                        
-#if 0                                                          /* looks OK but 
not correct - also would need float buffer */
+#if 0                                          /* looks OK but not correct - 
also would need float buffer */
                                                        
*projPixel->pixel.uint_pt = IMB_blend_color( *projPixel->pixel.uint_pt, 
*((unsigned int *)rgba_ub), (int)(alpha*256), blend);
 #endif
                                                        
@@ -3418,10 +3418,10 @@
                                                                /* TODO FLOAT 
*/ /* Smear wont do float properly yet */
                                                                /* Note, 
alpha*255 makes pixels darker */
                                                                
IMAPAINT_FLOAT_RGBA_TO_CHAR(rgba_smear, projPixel->pixel.f_pt);
-                                                               
((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *((unsigned int 
*)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*256), blend);
+                                                               
((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *((unsigned int 
*)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*255), blend);
                                                                
BLI_linklist_prepend_arena( &smearPixels_float, (void *)projPixel, smearArena );
                                                        } else {
-                                                               
((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( 
*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*256), blend);
+                                                               
((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( 
*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*255), blend);
                                                                
BLI_linklist_prepend_arena( &smearPixels, (void *)projPixel, smearArena );
                                                        }
                                                }
@@ -3506,6 +3506,7 @@
                
                handles[a].ps = ps;
                VECCOPY2D(handles[a].mval, pos);
+               VECCOPY2D(handles[a].prevmval, lastpos);
                
                /* thread spesific */
                handles[a].thread_index = a;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to