[Bf-blender-cvs] [bb30a721b4c] greasepencil-object: GP Eraser Panel: Expose button to activate eraser

Joshua Leung noreply at git.blender.org
Wed Feb 7 03:28:45 CET 2018


Commit: bb30a721b4c5b510a9a092add9791a12d452523a
Author: Joshua Leung
Date:   Wed Feb 7 15:28:33 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rBbb30a721b4c5b510a9a092add9791a12d452523a

GP Eraser Panel: Expose button to activate eraser

It's currently impossible to activate the eraser in the 3D view otherwise
if you're using a mouse (unlikely for most serious 2D artists, but possible
for non-sculpting modellers/animators) or if your tablet doesn't have an
eraser end (IIRC some non-Wacom styluses may have this limitation)

Also noted that we should also expose the hard/soft mode, and/or strength
settings here too (as opposed to having these hardcoded and/or mapped to
hardcoded modifier keys only)

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

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

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 56f934cb5f6..b6f92883b47 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -319,8 +319,11 @@ class GreasePencilEraserPanel:
     @staticmethod
     def draw(self, context):
         layout = self.layout
+        layout.operator("gpencil.draw", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'
+        
         col = layout.column(align=True)
         col.prop(context.user_preferences.edit, "grease_pencil_eraser_radius", text="Radius")
+        # TODO: Hard/Soft mode, sensitivity factors, etc.
 
 
 ###############################



More information about the Bf-blender-cvs mailing list