Commit: 5136791de1d39db61a9e97bb54d3dbb5a1dc06c4
Author: Joshua Leung
Date:   Tue Feb 9 01:47:32 2016 +1300
Branches: master
https://developer.blender.org/rB5136791de1d39db61a9e97bb54d3dbb5a1dc06c4

GPencil Eraser: Do not allow eraser radius to get smaller than 1 pixel

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

M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index 8c8f29b..227cff5 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2145,8 +2145,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator 
*op, const wmEvent *event)
                                case PADMINUS:
                                        p->radius -= 5;
                                        
-                                       if (p->radius < 0)
-                                               p->radius = 0;
+                                       if (p->radius <= 0)
+                                               p->radius = 1;
                                        break;
                        }
                        
diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index 0692a20..6a36048 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3774,7 +3774,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
 
        prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, 
PROP_PIXEL);
        RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
-       RNA_def_property_range(prop, 0, 100);
+       RNA_def_property_range(prop, 1, 500);
        RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius 
of eraser 'brush'");

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

Reply via email to