Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-15 18:34:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-15 18:34:57 +0400
commit0346ed80bd510c34f40bd0e2d36a5cd5a350a51a (patch)
tree6e8f00ba55fca17c35902fb3bf40449cb94f7ee9 /source
parent67e2d05dcd5673e95e574cb32fd71be9baa77507 (diff)
added a E as a key shortcut to IPO Extend Mode
Diffstat (limited to 'source')
-rw-r--r--source/blender/include/BSE_editipo.h1
-rw-r--r--source/blender/src/editipo_mods.c21
-rw-r--r--source/blender/src/header_ipo.c8
-rw-r--r--source/blender/src/space.c4
4 files changed, 30 insertions, 4 deletions
diff --git a/source/blender/include/BSE_editipo.h b/source/blender/include/BSE_editipo.h
index 99a7930ddb1..46c72f2747a 100644
--- a/source/blender/include/BSE_editipo.h
+++ b/source/blender/include/BSE_editipo.h
@@ -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 );
diff --git a/source/blender/src/editipo_mods.c b/source/blender/src/editipo_mods.c
index ae283ce8c0b..e8caa936985 100644
--- a/source/blender/src/editipo_mods.c
+++ b/source/blender/src/editipo_mods.c
@@ -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;
diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c
index 9770d2a5866..b7a3bfba541 100644
--- a/source/blender/src/header_ipo.c
+++ b/source/blender/src/header_ipo.c
@@ -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);
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 546a171c458..4abdc04dbd4 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -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);