[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26064] trunk/blender/source/blender/ editors/transform/transform.c: DopeSheet Keyframe/NLA Strip Scaling Tool:
Joshua Leung
aligorith at gmail.com
Mon Jan 18 01:45:33 CET 2010
Revision: 26064
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26064
Author: aligorith
Date: 2010-01-18 01:45:33 +0100 (Mon, 18 Jan 2010)
Log Message:
-----------
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?
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform.c
Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c 2010-01-18 00:35:28 UTC (rev 26063)
+++ trunk/blender/source/blender/editors/transform/transform.c 2010-01-18 00:45:33 UTC (rev 26064)
@@ -5451,10 +5451,10 @@
{
t->mode = TFM_TIME_SCALE;
t->transform = TimeScale;
+
+ // TODO: the scaling ratios obtained here aren't rapid enough
+ initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP);
- initMouseInputMode(t, &t->mouse, INPUT_NONE);
- t->helpline = HLP_SPRING; /* set manually because we don't use a predefined input */
-
t->flag |= T_NULL_ONE;
t->num.flag |= NUM_NULL_ONE;
@@ -5521,19 +5521,8 @@
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]);
More information about the Bf-blender-cvs
mailing list