diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-12-06 18:30:21 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-12-06 18:30:28 +0300 |
commit | 593d9724079e54a79a5d3c007af826fd6ea9bf6f (patch) | |
tree | 793abf9ed11c58c763292cd93cf6dfd659516923 | |
parent | eeaf45238117a81b07552bfc6fa70a304bfc4f83 (diff) |
Fix T72215: Insert Blank Keyframe Active Layer) creates a new frame in all layers
The default parameter was saved and the next time the operator was used, if it was used all layers, the default value changed.
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 418df724a08..a87db4543e4 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1615,6 +1615,8 @@ static int gp_blank_frame_add_exec(bContext *C, wmOperator *op) void GPENCIL_OT_blank_frame_add(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Insert Blank Frame"; ot->idname = "GPENCIL_OT_blank_frame_add"; @@ -1626,13 +1628,15 @@ void GPENCIL_OT_blank_frame_add(wmOperatorType *ot) ot->exec = gp_blank_frame_add_exec; ot->poll = gp_add_poll; - /* properties */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_boolean(ot->srna, - "all_layers", - false, - "All Layers", - "Create blank frame in all layers, not only active"); + + /* properties */ + prop = RNA_def_boolean(ot->srna, + "all_layers", + false, + "All Layers", + "Create blank frame in all layers, not only active"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } /* ******************* Delete Active Frame ************************ */ |