diff options
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r-- | source/blender/src/header_action.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 2834a41e9ec..0cd5fcba271 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -285,10 +285,16 @@ void do_action_buttons(unsigned short event) /* copy/paste buttons in Action Editor header */ case B_ACTCOPYKEYS: - copy_actdata(); + if (G.saction->mode == SACTCONT_GPENCIL) + copy_gpdata(); + else + copy_actdata(); break; case B_ACTPASTEKEYS: - paste_actdata(); + if (G.saction->mode == SACTCONT_GPENCIL) + paste_gpdata(); + else + paste_actdata(); break; case B_ACTPIN: /* __PINFAKE */ @@ -1735,20 +1741,24 @@ void action_buttons(void) uiClearButLock(); xco += 8; - - /* COPY PASTE */ - uiBlockBeginAlign(block); - if (curarea->headertype==HEADERTOP) { - uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYUP, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); - uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEUP, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); - } - else { - uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYDOWN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); - uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); - } - uiBlockEndAlign(block); - xco += (XIC + 8); - + } + + + /* COPY PASTE */ + uiBlockBeginAlign(block); + if (curarea->headertype==HEADERTOP) { + uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYUP, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); + uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEUP, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); + } + else { + uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYDOWN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer"); + uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer"); + } + uiBlockEndAlign(block); + xco += (XIC + 8); + + + if (G.saction->mode != SACTCONT_GPENCIL) { /* draw AUTOSNAP */ if (G.saction->flag & SACTION_DRAWTIME) { uiDefButC(block, MENU, B_REDR, |