From ac8d7873278c47e8e282b7f83888108e2720a451 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 2 Nov 2018 09:10:23 +1100 Subject: Tool System: brushes are now categorized by tool The toolbar now shows brush types, the brush selector now only shows brushes matching the current tool type. Details: - Add's Paint.tool_slots (used by the toolbar). - Removed custom grease pencil brush tool code. - Bumped subversion. See T57526 for details. --- .../scripts/startup/bl_ui/space_view3d_toolbar.py | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index f3c11023608..1abfb92917b 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1492,11 +1492,11 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel): if brush is not None: # XXX: Items in "sub" currently show up beside the brush selector in a separate column - if gp_settings.tool == 'ERASE': + if brush.gpencil_tool == 'ERASE': sub.prop(gp_settings, "use_default_eraser", text="") # Brush details - if gp_settings.tool == 'ERASE': + if brush.gpencil_tool == 'ERASE': row = layout.row(align=True) row.prop(brush, "size", text="Radius") row.prop(gp_settings, "use_pressure", text="", icon='STYLUS_PRESSURE') @@ -1509,7 +1509,7 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel): row.prop(gp_settings, "eraser_strength_factor") row = layout.row(align=True) row.prop(gp_settings, "eraser_thickness_factor") - elif gp_settings.tool == 'FILL': + elif brush.gpencil_tool == 'FILL': col = layout.column(align=True) col.prop(gp_settings, "fill_leak", text="Leak Size") col.separator() @@ -1550,9 +1550,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.active_gpencil_brush - gp_settings = brush.gpencil_settings - - return brush is not None and gp_settings.tool != 'ERASE' + return brush is not None and brush.gpencil_tool != 'ERASE' def draw_header_preset(self, context): VIEW3D_PT_gpencil_brush_presets.draw_panel_header(self.layout) @@ -1588,9 +1586,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.active_gpencil_brush - gp_settings = brush.gpencil_settings - - return brush is not None and gp_settings.tool == 'DRAW' + return brush is not None and brush.gpencil_tool == 'DRAW' def draw_header(self, context): brush = context.active_gpencil_brush @@ -1620,9 +1616,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.active_gpencil_brush - gp_settings = brush.gpencil_settings - - return brush is not None and gp_settings.tool != 'ERASE' + return brush is not None and brush.gpencil_tool != 'ERASE' def draw_header(self, context): brush = context.active_gpencil_brush @@ -1661,9 +1655,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.active_gpencil_brush - gp_settings = brush.gpencil_settings - - return brush is not None and gp_settings.tool != 'ERASE' + return brush is not None and brush.gpencil_tool != 'ERASE' def draw_header(self, context): brush = context.active_gpencil_brush @@ -1698,9 +1690,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel): @classmethod def poll(cls, context): brush = context.active_gpencil_brush - gp_settings = brush.gpencil_settings - - return brush is not None and gp_settings.tool != 'ERASE' + return brush is not None and brush.gpencil_tool != 'ERASE' @staticmethod def draw(self, context): -- cgit v1.2.3