GPencil Eraser: Do not allow eraser radius to get smaller than 1 pixel
authorJoshua Leung <aligorith@gmail.com>
Mon, 8 Feb 2016 12:47:32 +0000 (01:47 +1300)
committerJoshua Leung <aligorith@gmail.com>
Mon, 8 Feb 2016 13:45:33 +0000 (02:45 +1300)
source/blender/editors/gpencil/gpencil_paint.c
source/blender/makesrna/intern/rna_userdef.c

index 8c8f29b0f51b74b2c9d66265cf358e70075f4ee1..227cff5d5760d161e45a06e4f5a67870aca3ec68 100644 (file)
@@ -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;
                        }
                        
index 0692a200224643637d879327c78a56c4feb7b07e..6a36048acd790cb20b757ca06089fc34d3396950 100644 (file)
@@ -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'");