Page MenuHome

Change from 'd' key to 'draw' panel button causes pencil to be activated immediately instead of upon LMB
Closed, ResolvedPublic

Description

System Information
OSX 10.13.1

Blender Version

Short description of error

Start a grease pencil layer.
Hit 'd' to draw.
Draw something. Then>
Got to panel hit 'Draw' and pencil is activated from the time of button push instead of time from LMB.

Video Here: https://youtu.be/hX8D2n_Bk7Q

Related Objects

Event Timeline

Joshua Leung (aligorith) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Nov 26 2017, 12:57 AM

Indeed. It only seems to be a problem if you've used the hotkey-based method first.

A quick fix in your case would be to make the following changes to scripts/startup/bl_ui/properties_grease_pencil_common.py, in the GreasePencilDrawingToolsPanel -> draw() method. Replace the following lines:

col.label(text="Draw:")
row = col.row(align=True)
row.operator("gpencil.draw", icon='GREASEPENCIL', text="Draw").mode = 'DRAW'
row.operator("gpencil.draw", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'  # XXX: Needs a dedicated icon

row = col.row(align=True)
row.operator("gpencil.draw", icon='LINE_DATA', text="Line").mode = 'DRAW_STRAIGHT'
row.operator("gpencil.draw", icon='MESH_DATA', text="Poly").mode = 'DRAW_POLY'

with

col.label(text="Draw:")
row = col.row(align=True)
op = row.operator("gpencil.draw", icon='GREASEPENCIL', text="Draw")
op.mode = 'DRAW'
op.wait_for_input = True
op = row.operator("gpencil.draw", icon='FORCE_CURVE', text="Erase")
op.mode = 'ERASER'  # XXX: Needs a dedicated icon
op.wait_for_input = True

row = col.row(align=True)
op = row.operator("gpencil.draw", icon='LINE_DATA', text="Line")
op.mode = 'DRAW_STRAIGHT'
op.wait_for_input = True
op = row.operator("gpencil.draw", icon='MESH_DATA', text="Poly")
op.mode = 'DRAW_POLY'
op.wait_for_input = True

Yes, that fixed it.
Thanks