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>2010-01-18 03:45:33 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-18 03:45:33 +0300
commit1e983a931816b7c601bb6641039de0414640d969 (patch)
tree3995af17c59b01bfe8e5f4f593cf6b3eaae12cf6 /source/blender/editors/transform/transform.c
parent90e95d896c964bd17b9f46e5f41bcb3ba47618c4 (diff)
DopeSheet Keyframe/NLA Strip Scaling Tool:
Scaling behaviour relative to mouse movement was inverted. Made the this transform tool now use the standard input mechanism for scaling inputs so that the behaviour is now correct. Martin: In my tests, the responsiveness of the scale tool is now not sensitive enough though. If you have some time, could you look into whether this can be made to work a bit freer?
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r--source/blender/editors/transform/transform.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e8e7e323496..09fce29cbc7 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -5451,9 +5451,9 @@ void initTimeScale(TransInfo *t)
{
t->mode = TFM_TIME_SCALE;
t->transform = TimeScale;
-
- initMouseInputMode(t, &t->mouse, INPUT_NONE);
- t->helpline = HLP_SPRING; /* set manually because we don't use a predefined input */
+
+ // TODO: the scaling ratios obtained here aren't rapid enough
+ initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
t->flag |= T_NULL_ONE;
t->num.flag |= NUM_NULL_ONE;
@@ -5521,19 +5521,8 @@ static void applyTimeScale(TransInfo *t) {
int TimeScale(TransInfo *t, short mval[2])
{
- float cval, sval;
- float deltax, startx;
- float width= 0.0f;
char str[200];
-
- sval= t->imval[0];
- cval= mval[0];
-
- /* calculate scaling factor */
- startx= sval-(width/2+(t->ar->winx)/2);
- deltax= cval-(width/2+(t->ar->winx)/2);
- t->values[0] = deltax / startx;
-
+
/* handle numeric-input stuff */
t->vec[0] = t->values[0];
applyNumInput(&t->num, &t->vec[0]);