Fix #129819: GPv3: Context menu for all paint tools

Previously the `W` menu was only available for brush tools (brush and
eraser), it should be available to all tools, thus putting the key map
registering function into `km_grease_pencil_paint_mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129837
This commit is contained in:
YimingWu
2024-11-05 10:36:21 +01:00
committed by Falk David
parent 5c572f01cf
commit 334e9be8f4

View File

@@ -3788,6 +3788,8 @@ def km_grease_pencil_paint_mode(params):
"VIEW3D_AST_brush_gpencil_paint",
{"type": 'SPACE', "value": 'PRESS', "shift": True}
),
*_template_items_context_panel("VIEW3D_PT_greasepencil_draw_context_menu", params.context_menu_event),
])
return keymap
@@ -3820,7 +3822,6 @@ def km_grease_pencil_brush_stroke(_params):
{"properties": [("scalar", 0.9)]}),
("brush.scale_size", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "repeat": True},
{"properties": [("scalar", 1.0 / 0.9)]}),
*_template_items_context_panel("VIEW3D_PT_greasepencil_draw_context_menu", _params.context_menu_event),
])
return keymap