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-06-08 11:31:03 +0400
committerJoshua Leung <aligorith@gmail.com>2007-06-08 11:31:03 +0400
commit4a9aa0e064574dfc87a6f8c1084327b07256e0ce (patch)
tree0c1588e6bcac77df9e21a3ba7ae9403912eb5532 /source/blender/src/editaction.c
parent93a3b2b78a443c99cee9153cfff69127ed2fb336 (diff)
== Action/NLA ==
* Snap and Mirror tools for the Action Editor, now respect NLA scaling again. I accidentally omitted the relevant code when recoding. * Snap tool in the NLA Editor, now works for the keyframes displayed for each object too. There's one case I've to check up on later, as there might be interesting conflicts.
Diffstat (limited to 'source/blender/src/editaction.c')
-rw-r--r--source/blender/src/editaction.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 2fc0390b7f3..95a61707141 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -481,7 +481,7 @@ int get_nearest_key_num (Key *key, short *mval, float *x)
* x coordinate.
*/
int num;
- float ybase, y;
+ float y;
areamouseco_to_ipoco(G.v2d, mval, x, &y);
num = (int) ((CHANNELHEIGHT/2 - y) / (CHANNELHEIGHT+CHANNELSKIP));
@@ -1174,7 +1174,13 @@ void snap_action_keys(short mode)
/* snap to frame */
for (ale= act_data.first; ale; ale= ale->next) {
- snap_ipo_keys(ale->key_data, mode);
+ if (datatype==ACTCONT_ACTION && G.saction->pin==0 && OBACT) {
+ actstrip_map_ipo_keys(OBACT, ale->key_data, 0, 1);
+ snap_ipo_keys(ale->key_data, mode);
+ actstrip_map_ipo_keys(OBACT, ale->key_data, 1, 1);
+ }
+ else
+ snap_ipo_keys(ale->key_data, mode);
}
BLI_freelistN(&act_data);
@@ -1226,7 +1232,13 @@ void mirror_action_keys(short mode)
/* mirror */
for (ale= act_data.first; ale; ale= ale->next) {
- mirror_ipo_keys(ale->key_data, mode);
+ if (datatype==ACTCONT_ACTION && G.saction->pin==0 && OBACT) {
+ actstrip_map_ipo_keys(OBACT, ale->key_data, 0, 1);
+ mirror_ipo_keys(ale->key_data, mode);
+ actstrip_map_ipo_keys(OBACT, ale->key_data, 1, 1);
+ }
+ else
+ mirror_ipo_keys(ale->key_data, mode);
}
BLI_freelistN(&act_data);
@@ -2319,18 +2331,19 @@ static void mouse_action (int selectmode)
{
void *data;
short datatype;
- bAction *act;
- bActionChannel *achan;
+ bAction *act= NULL;
+ bActionChannel *achan= NULL;
bConstraintChannel *conchan= NULL;
IpoCurve *icu= NULL;
TimeMarker *marker;
void *act_channel;
short sel, act_type;
- float selx;
+ float selx;
/* determine what type of data we are operating on */
data = get_action_context(&datatype);
if (data == NULL) return;
+ if (datatype == ACTCONT_ACTION) act= (bAction *)data;
act_channel= get_nearest_action_key(&selx, &sel, &act_type, &achan);
marker=find_nearest_marker(1);