[Bf-blender-cvs] [941deaca7ad] master: Fix T53393: Change from 'd' key to 'draw' panel button causes pencil to be activated immediately instead of upon LMB
Joshua Leung
noreply at git.blender.org
Sun Nov 26 01:09:36 CET 2017
Commit: 941deaca7ad8fa269228a2110ead97aeea775809
Author: Joshua Leung
Date: Sun Nov 26 13:05:33 2017 +1300
Branches: master
https://developer.blender.org/rB941deaca7ad8fa269228a2110ead97aeea775809
Fix T53393: Change from 'd' key to 'draw' panel button causes pencil to be activated immediately instead of upon LMB
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list