diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-02 01:10:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-02 11:40:39 +0300 |
commit | ac8d7873278c47e8e282b7f83888108e2720a451 (patch) | |
tree | 902a404882e4ab22b8d7a153fbfc2e306747b083 /release/scripts/startup/bl_ui/space_view3d_toolbar.py | |
parent | 5bd3f3e64b7eba34e6c1676b82eec5b3c7d49d97 (diff) |
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.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 26 |
1 files changed, 8 insertions, 18 deletions
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): |