Cleanup: minor changes to the keymap

- Keyword only argument.
- Negate booleans with `not`.
This commit is contained in:
Campbell Barton
2023-05-25 20:27:09 +10:00
parent 09c2b327d7
commit f3677dce41

View File

@@ -3575,7 +3575,7 @@ def km_grease_pencil(params):
return keymap
def _grease_pencil_selection(params, use_select_mouse=True):
def _grease_pencil_selection(params, *, use_select_mouse=True):
return [
# Select all
*_template_items_select_actions(params, "gpencil.select_all"),
@@ -3956,7 +3956,7 @@ def km_grease_pencil_stroke_sculpt_mode(params):
items.extend([
# Selection
*_grease_pencil_selection(params, use_select_mouse=(params.use_fallback_tool_select_mouse == False)),
*_grease_pencil_selection(params, use_select_mouse=(not params.use_fallback_tool_select_mouse)),
# Brush strength
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
@@ -4307,7 +4307,7 @@ def km_grease_pencil_stroke_vertex_mode(params):
items.extend([
# Selection
*_grease_pencil_selection(params, use_select_mouse=(params.use_fallback_tool_select_mouse == False)),
*_grease_pencil_selection(params, use_select_mouse=(not params.use_fallback_tool_select_mouse)),
# Brush strength
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
{"properties": [