Fix T53393: Change from 'd' key to 'draw' panel button causes pencil to be activated...
authorJoshua Leung <aligorith@gmail.com>
Sun, 26 Nov 2017 00:05:33 +0000 (13:05 +1300)
committerJoshua Leung <aligorith@gmail.com>
Sun, 26 Nov 2017 00:06:16 +0000 (13:06 +1300)
source/blender/editors/gpencil/gpencil_paint.c

index cff198db6c0b3791aaf0cbf66dad57e63cffb458..f54356dfed3d2ec516bedeb825e57fb3e11a1ec4 100644 (file)
@@ -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);
 }