Revision: 48088
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48088
Author:   psy-fi
Date:     2012-06-19 17:21:59 +0000 (Tue, 19 Jun 2012)
Log Message:
-----------
Brush zoom resize
==================
* Account for float to int conversion and also clamp the result to 5
pixels or scaling up won't work after scaling to a very small size

Modified Paths:
--------------
    
branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_edit.c

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- 
branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_edit.c   
    2012-06-19 17:21:43 UTC (rev 48087)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/space_view3d/view3d_edit.c   
    2012-06-19 17:21:59 UTC (rev 48088)
@@ -1461,7 +1461,9 @@
        if (brush && (brush->flag & BRUSH_ZOOM_SCALE))
        {
                int oldsize = BKE_brush_size_get(scene, brush);
-               BKE_brush_size_set(scene, brush, oldsize*factor);
+               int newsize = oldsize*factor + 0.5;
+               newsize = (newsize > 5)? newsize : 5;
+               BKE_brush_size_set(scene, brush, newsize);
        }
 }
 

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

Reply via email to