diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-10-11 22:29:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-10-11 22:31:58 +0300 |
commit | 3842519a387ede582950c96d155c74dce3c4c059 (patch) | |
tree | ebed911aa71907ed2cae087f8776226bffb656ee /release/scripts | |
parent | 20b2acf336cb8f6965fd39728a746922d1b8ae42 (diff) |
Revert "Merge branch 'master' into blender-v2.81-release"
This reverts commit 20b2acf336cb8f6965fd39728a746922d1b8ae42, reversing
changes made to f185cc0ca55c8c817903d53bf5c107f3efd4e0db.
Merges should only go form the release branch to master. For backporting
commits, use cherry-pick.
Diffstat (limited to 'release/scripts')
m--------- | release/scripts/addons | 0 | ||||
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 13 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 38 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 13 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 23 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 3 |
6 files changed, 24 insertions, 66 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 7a6516c3e98ffa9cec21f490be733ee6d49a642 +Subproject 120d31a17c0eb571420b828425fc1fe6ef13db2 diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 74492f2a101..0728cbf8f9f 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -5869,18 +5869,6 @@ def km_3d_view_tool_paint_gpencil_cutter(params): ) -def km_3d_view_tool_paint_gpencil_eyedropper(params): - return ( - "3D View Tool: Paint Gpencil, Eyedropper", - {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, - {"items": [ - ("ui.eyedropper_gpencil_color", {"type": params.tool_mouse, "value": 'PRESS'}, None), - ("ui.eyedropper_gpencil_color", {"type": params.tool_mouse, "value": 'PRESS', "shift": True}, None), - ("ui.eyedropper_gpencil_color", {"type": params.tool_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, None), - ]}, - ) - - def km_3d_view_tool_edit_gpencil_select(params): return ( "3D View Tool: Edit Gpencil, Tweak", @@ -6218,7 +6206,6 @@ def generate_keymaps(params=None): km_3d_view_tool_paint_gpencil_arc(params), km_3d_view_tool_paint_gpencil_curve(params), km_3d_view_tool_paint_gpencil_cutter(params), - km_3d_view_tool_paint_gpencil_eyedropper(params), km_3d_view_tool_edit_gpencil_select(params), km_3d_view_tool_edit_gpencil_select_box(params), km_3d_view_tool_edit_gpencil_select_circle(params), diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index c201ccbe7f8..23b2556eddb 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -367,7 +367,7 @@ def brush_basic_sculpt_settings(layout, context, brush, *, compact=False): layout.row().prop(brush, "direction", expand=True, **({"text": ""} if compact else {})) -def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact=True, is_toolbar=False): +def brush_basic_gpencil_paint_settings(layout, _context, brush, *, compact=True): gp_settings = brush.gpencil_settings # Brush details @@ -395,23 +395,6 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact row = layout.row(align=True) row.prop(gp_settings, "fill_draw_mode", text="Boundary") row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID') - # Fill options - if is_toolbar: - settings = _context.tool_settings.gpencil_sculpt - row = layout.row(align=True) - sub = row.row(align=True) - sub.popover( - panel="TOPBAR_PT_gpencil_fill", - text="Fill Options", - ) - else: - row = layout.row(align=True) - row.prop(gp_settings, "fill_factor", text="Resolution") - if gp_settings.fill_draw_mode != 'STROKE': - row = layout.row(align=True) - row.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes") - row = layout.row(align=True) - row.prop(gp_settings, "fill_threshold", text="Threshold") else: # brush.gpencil_tool == 'DRAW': row = layout.row(align=True) row.prop(brush, "size", text="Radius") @@ -419,25 +402,6 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact row = layout.row(align=True) row.prop(gp_settings, "pen_strength", slider=True) row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') - - if tool.idname in {"builtin.arc", "builtin.curve", "builtin.line", "builtin.box", "builtin.circle"}: - settings = _context.tool_settings.gpencil_sculpt - if is_toolbar: - row = layout.row(align=True) - row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA') - sub = row.row(align=True) - sub.active = settings.use_thickness_curve - sub.popover( - panel="TOPBAR_PT_gpencil_primitive", - text="Thickness Profile", - ) - else: - row = layout.row(align=True) - row.prop(settings, "use_thickness_curve", text="Use Thickness Profile") - sub = row.row(align=True) - if settings.use_thickness_curve: - # Curve - layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True) def brush_basic_gpencil_sculpt_settings(layout, context, brush, *, compact=False): diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 112151d3478..4bce8a95528 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1393,17 +1393,6 @@ class _defs_gpencil_paint: ) - @ToolDef.from_fn - def eyedropper(): - return dict( - idname="builtin.eyedropper", - label="Eyedropper", - icon="ops.paint.weight_sample", - cursor='EYEDROPPER', - widget=None, - keymap=(), - ) - class _defs_gpencil_edit: @ToolDef.from_fn def bend(): @@ -2055,8 +2044,6 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): _defs_gpencil_paint.generate_from_brushes, _defs_gpencil_paint.cutter, None, - _defs_gpencil_paint.eyedropper, - None, _defs_gpencil_paint.line, _defs_gpencil_paint.arc, _defs_gpencil_paint.curve, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 5ad1dec9480..7d13c9c4112 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -351,7 +351,28 @@ class _draw_tool_settings_context_mode: from bl_ui.properties_paint_common import ( brush_basic_gpencil_paint_settings, ) - brush_basic_gpencil_paint_settings(layout, context, brush, tool, compact=True, is_toolbar=True) + brush_basic_gpencil_paint_settings(layout, context, brush, compact=True) + + # FIXME: tools must use their own UI drawing! + if tool.idname in {"builtin.arc", "builtin.curve", "builtin.line", "builtin.box", "builtin.circle"}: + settings = context.tool_settings.gpencil_sculpt + row = layout.row(align=True) + row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA') + sub = row.row(align=True) + sub.active = settings.use_thickness_curve + sub.popover( + panel="TOPBAR_PT_gpencil_primitive", + text="Thickness Profile", + ) + + if brush.gpencil_tool == 'FILL': + settings = context.tool_settings.gpencil_sculpt + row = layout.row(align=True) + sub = row.row(align=True) + sub.popover( + panel="TOPBAR_PT_gpencil_fill", + text="Fill Options", + ) @staticmethod def SCULPT_GPENCIL(context, layout, tool): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 8da5ba67187..3aee14e0239 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1873,8 +1873,7 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel): from bl_ui.properties_paint_common import ( brush_basic_gpencil_paint_settings, ) - tool = context.workspace.tools.from_space_view3d_mode(context.mode, create=False) - brush_basic_gpencil_paint_settings(layout, context, brush, tool, compact=True, is_toolbar=False) + brush_basic_gpencil_paint_settings(layout, context, brush, compact=True) # Grease Pencil drawing brushes options |