Commit: f6135894fe1fce9659b4c31dbcedb255d0e8623a
Author: Joshua Leung
Date:   Mon Aug 17 02:24:36 2015 +1200
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rBf6135894fe1fce9659b4c31dbcedb255d0e8623a

GP Sculpt: Thickness brush now uses the timer too

===================================================================

M       source/blender/editors/gpencil/gpencil_brush.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_brush.c 
b/source/blender/editors/gpencil/gpencil_brush.c
index 76bd30d..3c2371e2 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1218,6 +1218,7 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator 
*op, const wmEvent *eve
 {
        tGP_BrushEditData *gso = NULL;
        bool needs_timer = false;
+       float brush_rate = 0.0f;
        
        /* init painting data */
        if (!gpsculpt_brush_init(C, op))
@@ -1233,7 +1234,13 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator 
*op, const wmEvent *eve
                        break;
                
                /* Brushes requiring timer... */
+               case GP_EDITBRUSH_TYPE_THICKNESS:
+                       brush_rate = 0.001f; // XXX: hardcoded
+                       needs_timer = true;
+                       break;
+               
                case GP_EDITBRUSH_TYPE_TWIST:
+                       brush_rate = 0.01f; // XXX: hardcoded
                        needs_timer = true;
                        break;
                        
@@ -1243,8 +1250,7 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator 
*op, const wmEvent *eve
        
        /* register timer for increasing influence by hovering over an area */
        if (needs_timer) {
-               float brushRate = 0.01; // XXX: hardcoded
-               gso->timer = WM_event_add_timer(CTX_wm_manager(C), 
CTX_wm_window(C), TIMER, brushRate);
+               gso->timer = WM_event_add_timer(CTX_wm_manager(C), 
CTX_wm_window(C), TIMER, brush_rate);
        }
        
        /* register modal handler */

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

Reply via email to