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:
authorTon Roosendaal <ton@blender.org>2005-10-31 12:41:24 +0300
committerTon Roosendaal <ton@blender.org>2005-10-31 12:41:24 +0300
commit53052c9924fe4e3ef4d1966dec3958640c45fab6 (patch)
tree3f1bce8849f71f46a358ef735c0f0d9eb9ec6e81 /source/blender/src/header_action.c
parent3150b5a7a774898b740e0a6b15d109d314e52ae6 (diff)
iNew: TimeSlide in Action Window
Usage: press Tkey, and you can proportionally squeeze or stretch the selected keys, with current mouse position as reference. Only works with more than 3 keys selected horizontally. I've remapped the old Tkey (ipo type) to SHIFT+T... might be temporal, I have an idea for a cool 2D manipulator system that makes it much friendlier to grab/scale/slide keys all in once. Also: fix for HOME key in action editor (didn't do Pin), and removed gcc warnings from jiri's commit in editmesh_add.c
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r--source/blender/src/header_action.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index b091e0a2940..7c245132cb7 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -95,6 +95,7 @@
#define ACTMENU_KEY_TRANSFORM_MOVE 0
#define ACTMENU_KEY_TRANSFORM_SCALE 1
+#define ACTMENU_KEY_TRANSFORM_SLIDE 2
#define ACTMENU_KEY_HANDLE_AUTO 0
#define ACTMENU_KEY_HANDLE_ALIGN 1
@@ -140,9 +141,10 @@ void do_action_buttons(unsigned short event)
float extra;
calc_action_range(G.saction->action, &G.v2d->cur.xmin, &G.v2d->cur.xmax);
- G.v2d->cur.xmin= get_action_frame_inv(ob, G.v2d->cur.xmin);
- G.v2d->cur.xmax= get_action_frame_inv(ob, G.v2d->cur.xmax);
-
+ if(G.saction->pin==0 && ob) {
+ G.v2d->cur.xmin= get_action_frame_inv(ob, G.v2d->cur.xmin);
+ G.v2d->cur.xmax= get_action_frame_inv(ob, G.v2d->cur.xmax);
+ }
extra= 0.05*(G.v2d->cur.xmax - G.v2d->cur.xmin);
G.v2d->cur.xmin-= extra;
G.v2d->cur.xmax+= extra;
@@ -413,6 +415,14 @@ static void do_action_keymenu_transformmenu(void *arg, int event)
transform_actionchannel_keys ('s', 0);
}
break;
+ case ACTMENU_KEY_TRANSFORM_SLIDE:
+ if (key) {
+ //transform_meshchannel_keys('t', key);
+ }
+ else if (act) {
+ transform_actionchannel_keys ('t', 0);
+ }
+ break;
}
scrarea_queue_winredraw(curarea);
@@ -428,14 +438,16 @@ static uiBlock *action_keymenu_transformmenu(void *arg_unused)
uiBlockSetButmFunc(block, do_action_keymenu_transformmenu, NULL);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Grab/Move|G", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
+ "Grab/Move|G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_TRANSFORM_MOVE, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
- "Scale|S", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 0,
+ "Scale|S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_KEY_TRANSFORM_SCALE, "");
-
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Time Slide|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,
+ ACTMENU_KEY_TRANSFORM_SLIDE, "");
+
+
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);