diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-07 03:38:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-07 03:42:30 +0300 |
commit | c19dafd2a62fe0bebe6f834017b108e77d133682 (patch) | |
tree | 812a90384c375ea82bdc34893bcdd3bd2f01154a /release/scripts/startup/bl_ui/space_toolsystem_common.py | |
parent | 895295a9f0cb85c7c48c395621b9c9d7e5fc78a3 (diff) |
Paint: paint.brush_select now supports gpencil
Replace grease pencil specific brush select operator.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_common.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index f23b76c5911..6ddfcd97940 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -812,11 +812,13 @@ def keymap_from_context(context, space_type): if item.data_block: # PAINT_OT_brush_select mode = context.active_object.mode + # See: BKE_paint_get_tool_prop_id_from_paintmode attr = { 'SCULPT': "sculpt_tool", - 'WEIGHT_PAINT': "weight_paint_tool", - 'VERTEX_PAINT': "vertex_paint_tool", - 'TEXTURE_PAINT': "texture_paint_tool", + 'VERTEX_PAINT': "vertex_tool", + 'WEIGHT_PAINT': "weight_tool", + 'TEXTURE_PAINT': "image_tool", + 'GPENCIL_PAINT': "gpencil_tool", }.get(mode, (None, None)) if attr is not None: kmi_hack_brush_select_properties.paint_mode = mode @@ -826,10 +828,6 @@ def keymap_from_context(context, space_type): context='INVOKE_REGION_WIN', properties=kmi_hack_brush_select_properties, )[1] - elif mode == 'GPENCIL_PAINT': - # TODO: gpencil.brush_select - # By default no keys are mapped to this, pass. - pass else: print("Unsupported mode:", mode) del mode, attr |