diff options
author | Joshua Leung <aligorith@gmail.com> | 2006-11-30 04:57:14 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2006-11-30 04:57:14 +0300 |
commit | d310f203da61eedf01d43f5c8690e8a58d5a584c (patch) | |
tree | 607b22c7e288f6e86a653a0c695d6654a8063d1f /source/blender/src/header_ipo.c | |
parent | 2572b9f72c8f10b01de949e59b481ac5a587aca4 (diff) |
Big Commit.
Now time-markers work in all time-related spaces (i.e. Ipo,
Action Editor, NLA editor, TimeLine, Sound). The hotkeys and
functionality set should be the same for each of these modes
(with a few exceptions still). I've had to change a few hotkeys
here and there, so hopefully they aren't too bad.
Marker Operations:
MKEY - Add Marker
SHIFT MKEY - Rename marker (was CTRL MKEY)
XKEY - Delete Marker
PAGE UP - Jump to next marker
PAGE DOWN - Jump to previous marker
CTRL A - Select all markers
SHIFT G - Transform markers (NLA, IPO, Action)
G - Transform markers (Sound, Timeline)
CTRL SHIFT D - Duplicate markers (NLA, IPO, Action)
SHIFT D - Duplicate markers (Sound, Timeline)
BKEY - select markers and other keyframes (if any)
I've also made a few little tool additions to NLA and Action editors:
* NLA editor - Snap To Frame.
Now with the option to offset strip so that it starts at the current frame.
Added menus for this.
* Action editor - Snap To Frame
A few new menus for this too
Diffstat (limited to 'source/blender/src/header_ipo.c')
-rw-r--r-- | source/blender/src/header_ipo.c | 79 |
1 files changed, 73 insertions, 6 deletions
diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c index aa446fc50dc..a79302905d9 100644 --- a/source/blender/src/header_ipo.c +++ b/source/blender/src/header_ipo.c @@ -79,6 +79,7 @@ #include "BSE_edit.h" #include "BSE_editipo.h" #include "BSE_headerbuttons.h" +#include "BSE_time.h" #include "BIF_editaction.h" #include "BIF_interface.h" @@ -336,9 +337,9 @@ static uiBlock *ipo_editmenu_mirrormenu(void *arg_unused) block= uiNewBlock(&curarea->uiblocks, "ipo_editmenu_mirrormenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); uiBlockSetButmFunc(block, do_ipo_editmenu_mirrormenu, NULL); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Current Frame|M, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Vertical Axis|M, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Horizontal Axis|M, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Current Frame|Ctrl M, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Vertical Axis|Ctrl M, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Over Horizontal Axis|Ctrl M, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); @@ -555,7 +556,7 @@ static void do_ipo_editmenu(void *arg, int event) switch(event) { case 0: - del_ipo(); + del_ipo(1); break; case 1: add_duplicate_editipo(); @@ -813,6 +814,69 @@ static uiBlock *ipo_selectmenu(void *arg_unused) return block; } +static void do_ipo_markermenu(void *arg, int event) +{ + switch(event) + { + case 1: + add_marker(CFRA); + break; + case 2: + duplicate_marker(); + break; + case 3: + remove_marker(); + break; + case 4: + rename_marker(); + break; + case 5: + transform_markers('g', 0); + break; + } + + allqueue(REDRAWTIME, 0); + allqueue(REDRAWIPO, 0); + allqueue(REDRAWACTION, 0); + allqueue(REDRAWNLA, 0); + allqueue(REDRAWSOUND, 0); +} + +static uiBlock *ipo_markermenu(void *arg_unused) +{ + uiBlock *block; + short yco= 0, menuwidth=120; + + block= uiNewBlock(&curarea->uiblocks, "ipo_markermenu", + UI_EMBOSSP, UI_HELV, curarea->headwin); + uiBlockSetButmFunc(block, do_ipo_markermenu, NULL); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Marker|M", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate Marker|Ctrl Shift D", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Marker|X", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "(Re)Name Marker|Shift M", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Grab/Move Marker|Shift G", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); + + if(curarea->headertype==HEADERTOP) { + uiBlockSetDirection(block, UI_DOWN); + } + else { + uiBlockSetDirection(block, UI_TOP); + uiBlockFlipOrder(block); + } + + uiTextBoundsBlock(block, 50); + + return block; +} static char *ipo_modeselect_pup(void) { @@ -1113,7 +1177,11 @@ void ipo_buttons(void) xmax= GetButStringLength("Select"); uiDefPulldownBut(block,ipo_selectmenu, NULL, "Select", xco, -2, xmax-3, 24, ""); xco+=xmax; - + + xmax= GetButStringLength("Marker"); + uiDefPulldownBut(block,ipo_markermenu, NULL, "Marker", xco, -2, xmax-3, 24, ""); + xco+=xmax; + if (G.sipo->showkey) { xmax= GetButStringLength("Key"); uiDefPulldownBut(block,ipo_editmenu, NULL, "Key", xco, -2, xmax-3, 24, ""); @@ -1126,7 +1194,6 @@ void ipo_buttons(void) xmax= GetButStringLength("Curve"); uiDefPulldownBut(block,ipo_editmenu, NULL, "Curve", xco, -2, xmax-3, 24, ""); } - xco+=xmax; } |