Revision: 30641
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30641
Author:   campbellbarton
Date:     2010-07-23 00:04:07 +0200 (Fri, 23 Jul 2010)

Log Message:
-----------
minor warning fix
brush_alpha was being converted to an int not a float, if this is intentional 
it should be delared 'const int', but looks like it wasnt.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c       
2010-07-22 21:56:29 UTC (rev 30640)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c       
2010-07-22 22:04:07 UTC (rev 30641)
@@ -77,7 +77,7 @@
 {
        Paint  *paint=  paint_get_active(CTX_data_scene(C));
        Brush  *brush=  paint_brush(paint);
-       Object *ob=     CTX_data_active_object(C);
+       // Object *ob=     CTX_data_active_object(C);
        float   scalar= RNA_float_get(op->ptr, "scalar");
 
        if (brush) {
@@ -86,14 +86,14 @@
                        const int old_size= brush_size(brush);
                        int size= (int)(scalar*old_size);
 
-                       if (old_size == size)
+                       if (old_size == size) {
                                if (scalar > 1) {
                                        size++;
                                }
                                else if (scalar < 1) {
                                        size--;
                                }
-
+                       }
                        CLAMP(size, 1, 2000); // XXX magic number
 
                        brush_set_size(brush, size);

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2010-07-22 
21:56:29 UTC (rev 30640)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c  2010-07-22 
22:04:07 UTC (rev 30641)
@@ -589,7 +589,7 @@
        Brush *brush = paint_brush(&sd->paint);
 
        /* Primary strength input; square it to make lower values more 
sensitive */
-       const root_alpha   = brush_alpha(brush);
+       const float root_alpha = brush_alpha(brush);
        float alpha        = root_alpha*root_alpha;
        float dir          = brush->flag & BRUSH_DIR_IN ? -1 : 1;
        float pressure     = brush_use_alpha_pressure(brush) ? cache->pressure 
: 1;


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

Reply via email to