[Bf-blender-cvs] [b24fec55a4c] greasepencil-object: UI: Add different parameter to TopBar for each type of brush
Antonio Vazquez
noreply at git.blender.org
Wed Jul 11 15:48:40 CEST 2018
Commit: b24fec55a4c84238cd7abe93e2cb0f86e0d62882
Author: Antonio Vazquez
Date: Wed Jul 11 15:48:29 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBb24fec55a4c84238cd7abe93e2cb0f86e0d62882
UI: Add different parameter to TopBar for each type of brush
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 6f3e4eab956..77c6e65258b 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -993,15 +993,32 @@ class _defs_gpencil_paint:
brush = context.active_gpencil_brush
gp_settings = brush.gpencil_settings
- row = layout.row(align=True)
- row.prop(brush, "size", text="Radius")
- row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
- row = layout.row(align=True)
- row.prop(gp_settings, "pen_strength", slider=True)
- row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
-
- row = layout.row(align=True)
- row.template_ID(gp_settings, "material")
+ if gp_settings.gpencil_brush_type == 'ERASE':
+ row = layout.row()
+ row.prop(brush, "size", text="Radius")
+ elif gp_settings.gpencil_brush_type == 'FILL':
+ row = layout.row()
+ row.prop(gp_settings, "gpencil_fill_leak", text="Leak Size")
+ row.prop(brush, "size", text="Thickness")
+ row.prop(gp_settings, "gpencil_fill_simplyfy_level", text="Simplify")
+
+ row = layout.row()
+ row.template_ID(gp_settings, "material")
+
+ row = layout.row(align=True)
+ row.prop(gp_settings, "gpencil_fill_draw_mode", text="")
+ row.prop(gp_settings, "gpencil_fill_show_boundary", text="", icon='GRID')
+
+ else: # bgpsettings.gpencil_brush_type == 'DRAW':
+ row = layout.row(align=True)
+ row.prop(brush, "size", text="Radius")
+ row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE')
+ row = layout.row(align=True)
+ row.prop(gp_settings, "pen_strength", slider=True)
+ row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
+
+ row = layout.row(align=True)
+ row.template_ID(gp_settings, "material")
@staticmethod
def generate_from_brushes(context):
More information about the Bf-blender-cvs
mailing list