diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-12-13 11:03:13 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-12-13 11:03:13 +0300 |
commit | a1f87064c4c0cd9e8eafc19c599c4ad4ccdba49f (patch) | |
tree | d016e95050f10eda7bc44e1bdfa2f7c4fc0fc024 /source/blender/editors/space_action/action_edit.c | |
parent | d9ee88d126ddb59b68d2561694b522a99e4923b6 (diff) |
Grease Pencil: Merge GPencil_Editing_Stage3 branch into master
This commit merges all the work done in the GPencil_Editing_Stage3 branch
as of ef2aecf2db981b5344e0d14e7f074f1742b0b2f7 into master. For more details
about the changes that this brings, see the WIP release notes:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/GPencil
Diffstat (limited to 'source/blender/editors/space_action/action_edit.c')
-rw-r--r-- | source/blender/editors/space_action/action_edit.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 0dd5c7ca775..ce0db9e5523 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -549,9 +549,10 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) /* copy keyframes */ if (ac.datatype == ANIMCONT_GPENCIL) { - /* FIXME... */ - BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for grease pencil mode"); - return OPERATOR_CANCELLED; + if (ED_gpencil_anim_copybuf_copy(&ac) == false) { + /* Nothing got copied - An error about this should be been logged already */ + return OPERATOR_CANCELLED; + } } else if (ac.datatype == ANIMCONT_MASK) { /* FIXME... */ @@ -599,7 +600,13 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) ac.reports = op->reports; /* paste keyframes */ - if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { + if (ac.datatype == ANIMCONT_GPENCIL) { + if (ED_gpencil_anim_copybuf_paste(&ac, offset_mode) == false) { + /* An error occurred - Reports should have been fired already */ + return OPERATOR_CANCELLED; + } + } + else if (ac.datatype == ANIMCONT_MASK) { /* FIXME... */ BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for grease pencil or mask mode"); return OPERATOR_CANCELLED; |