diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-08-10 17:34:19 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-08-10 17:34:26 +0300 |
commit | 4ada2909566c6966607d3a4d78964902ad9e19a6 (patch) | |
tree | 6cd8ecfe1fd285de529e87db9b095be763c7cd20 /release | |
parent | 3fe2fceb4e35704a756ef064b2f4a289a6843261 (diff) |
GPencil: Invert Filled area pressing Ctrl key
This feature was suggested in https://blender.community/c/rightclickselect/rggbbc/
When press `Ctrl+LMB`, the filled area is inverted.
{F8749306}
{F8749307}
Filling several areas:
{F8759399}
Differential Revision: https://developer.blender.org/D8477
Diffstat (limited to 'release')
3 files changed, 13 insertions, 15 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index efa4b9b00a0..b945a92020f 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -3364,16 +3364,14 @@ def km_grease_pencil_stroke_paint_fill(params): # Fill ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("on_back", False)]}), - ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [("on_back", True)]}), + ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("on_back", False)]}), # If press alternate key, the brush now it's for drawing areas - ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, - {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True)]}), + ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_stabilizer", True)]}), # If press alternative key, the brush now it's for drawing lines - ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, - {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_fill", True)]}), - # Lasso select - ("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None), + ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True, "shift": True}, + {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_stabilizer", True), ("disable_fill", True)]}), ]) return keymap diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index eedf07935c8..04721a1704a 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -2465,16 +2465,14 @@ def km_grease_pencil_stroke_paint_fill(params): # Fill ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("on_back", False)]}), - ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [("on_back", True)]}), + ("gpencil.fill", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, + {"properties": [("on_back", False)]}), # If press alternate key, the brush now it's for drawing areas - ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, - {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True)]}), + ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, + {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_stabilizer", True)]}), # If press alternative key, the brush now it's for drawing lines ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True, "shift": True}, - {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_fill", True)]}), - # Lasso select - ("gpencil.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True, "alt": True}, None), + {"properties": [("mode", 'DRAW'), ("wait_for_input", False), ("disable_straight", True), ("disable_stabilizer", True), ("disable_fill", True)]}), ]) return keymap diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 01f9eedd96e..12f02acedc2 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -1138,6 +1138,8 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False) # FIXME: tools must use their own UI drawing! elif brush.gpencil_tool == 'FILL': row = layout.row(align=True) + row.prop(gp_settings, "fill_direction", text="", expand=True) + row = layout.row(align=True) row.prop(gp_settings, "fill_leak", text="Leak Size") row = layout.row(align=True) row.prop(brush, "size", text="Thickness") |