diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-11-26 03:05:33 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-11-26 03:06:16 +0300 |
commit | 941deaca7ad8fa269228a2110ead97aeea775809 (patch) | |
tree | 6d41ffdeb257bcb1e9ad2976054acb3804c194ef | |
parent | 3c1f3c02c60f6ace330c53299640a6ca6499b6b9 (diff) |
Fix T53393: Change from 'd' key to 'draw' panel button causes pencil to be activated immediately instead of upon LMB
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index cff198db6c0..f54356dfed3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -2745,6 +2745,8 @@ static const EnumPropertyItem prop_gpencil_drawmodes[] = { void GPENCIL_OT_draw(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Grease Pencil Draw"; ot->idname = "GPENCIL_OT_draw"; @@ -2761,11 +2763,12 @@ void GPENCIL_OT_draw(wmOperatorType *ot) ot->flag = OPTYPE_UNDO | OPTYPE_BLOCKING; /* settings for drawing */ - PropertyRNA *prop; ot->prop = RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to interpret mouse movements"); + prop = RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* NOTE: wait for input is enabled by default, so that all UI code can work properly without needing users to know about this */ - RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "Wait for first click instead of painting immediately"); + prop = RNA_def_boolean(ot->srna, "wait_for_input", true, "Wait for Input", "Wait for first click instead of painting immediately"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } |