added a E as a key shortcut to IPO Extend Mode

This commit is contained in:
Campbell Barton
2008-04-15 14:34:57 +00:00
parent 67e2d05dcd
commit 0346ed80bd
4 changed files with 30 additions and 4 deletions

View File

@@ -113,6 +113,7 @@ void sethandles_ipo(int code);
void select_ipo_bezier_keys(struct Ipo *ipo, int selectmode);
void select_icu_bezier_keys(struct IpoCurve *icu, int selectmode);
void set_ipotype(void);
void set_ipoextend(void);
void borderselect_ipo(void);
void del_ipo(int need_check);
void del_ipoCurve ( struct IpoCurve * icu );

View File

@@ -969,6 +969,27 @@ void set_ipotype(void)
scrarea_queue_winredraw(curarea);
}
void set_ipoextend(void)
{
short event= pupmenu("Ipo Extend Mode %t|Constant %x1|Extrapolation %x2|Cyclic %x3|Cyclic Extrapolation %x4");
switch(event)
{
case 0:
set_exprap_ipo(IPO_HORIZ);
break;
case 1:
set_exprap_ipo(IPO_DIR);
break;
case 2:
set_exprap_ipo(IPO_CYCL);
break;
case 3:
set_exprap_ipo(IPO_CYCLX);
break;
}
}
void borderselect_ipo(void)
{
EditIpo *ei;

View File

@@ -567,10 +567,10 @@ static uiBlock *ipo_editmenu_extendmenu(void *arg_unused)
block= uiNewBlock(&curarea->uiblocks, "ipo_editmenu_extendmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_ipo_editmenu_extendmenu, NULL);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Constant", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extrapolation", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cyclic", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cyclic Extrapolation", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Constant|E, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extrapolation|E, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cyclic|E, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cyclic Extrapolation|E, 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);

View File

@@ -3133,6 +3133,10 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt)
if (G.qual==0)
set_ipotype();
break;
case EKEY:
if (G.qual==0)
set_ipoextend();
break;
case VKEY:
if (G.qual==0)
sethandles_ipo(HD_VECT);