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
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-08-22 12:52:57 +0400
committerJoshua Leung <aligorith@gmail.com>2007-08-22 12:52:57 +0400
commit59016f9f5da298568f0d7c1a9af98b03aa6477ad (patch)
treec949cd0e45ee11a8c57c4528546233edf8dfaf0b /source/blender/src
parent941ee4139ea1583b6c4e83d5ed7ad693f8709db9 (diff)
Bugfix #7083:
The menu entries for changing Interpolation and Extrapolation modes in the Action Editor weren't working properly (at all).
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/editaction.c20
-rw-r--r--source/blender/src/editipo_mods.c5
-rw-r--r--source/blender/src/header_action.c20
3 files changed, 25 insertions, 20 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 33e465640be..9ecb958b567 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -1507,13 +1507,13 @@ void clean_action (void)
/* this function combines several features related to setting
* various ipo extrapolation/interpolation
*/
-void action_set_ipo_flags (int mode)
+void action_set_ipo_flags (short mode, short event)
{
ListBase act_data = {NULL, NULL};
bActListElem *ale;
void *data;
short datatype;
- int filter, event;
+ int filter;
/* determine what type of data we are operating on */
data = get_action_context(&datatype);
@@ -1530,7 +1530,7 @@ void action_set_ipo_flags (int mode)
"Extrapolation %x12|"
"Cyclic %x13|"
"Cyclic extrapolation %x14");
- if(event < 1) return;
+ if (event < 1) return;
}
break;
case SET_IPO_POPUP:
@@ -1541,16 +1541,20 @@ void action_set_ipo_flags (int mode)
"Constant %x1|"
"Linear %x2|"
"Bezier %x3");
- if(event < 1) return;
+ if (event < 1) return;
}
break;
+ case SET_IPO_MENU: /* called from menus */
+ case SET_EXTEND_MENU:
+ break;
+
default: /* weird, unhandled case */
return;
}
/* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
+ filter= (ACTFILTER_VISIBLE | ACTFILTER_SEL | ACTFILTER_FOREDIT | ACTFILTER_IPOKEYS);
actdata_filter(&act_data, filter, data, datatype);
/* loop through setting flags */
@@ -1560,6 +1564,7 @@ void action_set_ipo_flags (int mode)
/* depending on the mode */
switch (mode) {
case SET_EXTEND_POPUP: /* extrapolation */
+ case SET_EXTEND_MENU:
{
switch (event) {
case SET_EXTEND_CONSTANT:
@@ -1578,6 +1583,7 @@ void action_set_ipo_flags (int mode)
}
break;
case SET_IPO_POPUP: /* interpolation */
+ case SET_IPO_MENU:
{
setipotype_ipo(ipo, event);
}
@@ -2824,7 +2830,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
short val= evt->val;
short mousebut = L_MOUSE;
- if(curarea->win==0) return;
+ if (curarea->win==0) return;
saction= curarea->spacedata.first;
if (!saction)
@@ -3020,7 +3026,7 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case TKEY:
if (G.qual & LR_SHIFTKEY)
- action_set_ipo_flags(SET_IPO_POPUP);
+ action_set_ipo_flags(SET_IPO_POPUP, 0);
else if (G.qual & LR_CTRLKEY) {
val= pupmenu("Time value%t|Frames %x1|Seconds%x2");
diff --git a/source/blender/src/editipo_mods.c b/source/blender/src/editipo_mods.c
index 2fc4f458e01..1f12f3863fe 100644
--- a/source/blender/src/editipo_mods.c
+++ b/source/blender/src/editipo_mods.c
@@ -872,9 +872,8 @@ void setipotype_ipo(Ipo *ipo, int code)
void setexprap_ipoloop(Ipo *ipo, int code)
{
IpoCurve *icu;
-
- /* Loop through each curve in the Ipo
- */
+
+ /* Loop through each curve in the Ipo */
for (icu=ipo->curve.first; icu; icu=icu->next)
icu->extrap= code;
}
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index 4072dd042b4..1c34bdbaeaf 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -682,13 +682,13 @@ static void do_action_keymenu_intpolmenu(void *arg, int event)
switch(event)
{
case ACTMENU_KEY_INTERP_CONST:
- action_set_ipo_flags(SET_IPO_CONSTANT);
+ action_set_ipo_flags(SET_IPO_MENU, SET_IPO_CONSTANT);
break;
case ACTMENU_KEY_INTERP_LINEAR:
- action_set_ipo_flags(SET_IPO_LINEAR);
+ action_set_ipo_flags(SET_IPO_MENU, SET_IPO_LINEAR);
break;
case ACTMENU_KEY_INTERP_BEZIER:
- action_set_ipo_flags(SET_IPO_BEZIER);
+ action_set_ipo_flags(SET_IPO_MENU, SET_IPO_BEZIER);
break;
}
@@ -705,15 +705,15 @@ static uiBlock *action_keymenu_intpolmenu(void *arg_unused)
uiBlockSetButmFunc(block, do_action_keymenu_intpolmenu, NULL);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Constant", 0, yco-=20,
+ "Constant|Shift T, 1", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_INTERP_CONST, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Linear", 0, yco-=20,
+ "Linear|Shift T, 2", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_INTERP_LINEAR, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Bezier", 0, yco-=20,
+ "Bezier|Shift T, 3", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_INTERP_BEZIER, "");
@@ -728,16 +728,16 @@ static void do_action_keymenu_extendmenu(void *arg, int event)
switch(event)
{
case ACTMENU_KEY_EXTEND_CONST:
- action_set_ipo_flags(SET_EXTEND_CONSTANT);
+ action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CONSTANT);
break;
case ACTMENU_KEY_EXTEND_EXTRAPOLATION:
- action_set_ipo_flags(SET_EXTEND_EXTRAPOLATION);
+ action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_EXTRAPOLATION);
break;
case ACTMENU_KEY_EXTEND_CYCLIC:
- action_set_ipo_flags(SET_EXTEND_CYCLIC);
+ action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CYCLIC);
break;
case ACTMENU_KEY_EXTEND_CYCLICEXTRAPOLATION:
- action_set_ipo_flags(SET_EXTEND_CYCLICEXTRAPOLATION);
+ action_set_ipo_flags(SET_EXTEND_MENU, SET_EXTEND_CYCLICEXTRAPOLATION);
break;
}