[Bf-blender-cvs] [dcbce4b9241] master: Fix T6813: Dopesheet Editor: Moving keyframes by a number value doesn't work

mano-wii noreply at git.blender.org
Tue Aug 6 02:47:33 CEST 2019


Commit: dcbce4b9241900c9090579c7f8bdf662f49e32cd
Author: mano-wii
Date:   Mon Aug 5 21:47:22 2019 -0300
Branches: master
https://developer.blender.org/rBdcbce4b9241900c9090579c7f8bdf662f49e32cd

Fix T6813: Dopesheet Editor: Moving keyframes by a number value doesn't work

It was a mistake to add the line `t->values_final[0] = t->values[0];`

===================================================================

M	source/blender/editors/transform/transform.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 9723e640259..fe8320d1345 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -9462,7 +9462,7 @@ static void headerTimeTranslate(TransInfo *t, char str[UI_MAX_DRAW_STR])
   }
 }
 
-static void applyTimeTranslateValue(TransInfo *t)
+static void applyTimeTranslateValue(TransInfo *t, float value)
 {
   Scene *scene = t->scene;
   int i;
@@ -9471,7 +9471,6 @@ static void applyTimeTranslateValue(TransInfo *t)
   const double secf = FPS;
 
   float deltax, val /* , valprev */;
-  t->values_final[0] = t->values[0];
 
   FOREACH_TRANS_DATA_CONTAINER (t, tc) {
     TransData *td = tc->data;
@@ -9489,7 +9488,7 @@ static void applyTimeTranslateValue(TransInfo *t)
 
       /* check if any need to apply nla-mapping */
       if (adt && (t->spacetype != SPACE_SEQ)) {
-        deltax = t->values_final[0];
+        deltax = value;
 
         if (autosnap == SACTSNAP_TSTEP) {
           deltax = (float)(floor(((double)deltax / secf) + 0.5) * secf);
@@ -9542,7 +9541,7 @@ static void applyTimeTranslate(TransInfo *t, const int mval[2])
   t->values_final[0] = t->vec[0];
   headerTimeTranslate(t, str);
 
-  applyTimeTranslateValue(t);
+  applyTimeTranslateValue(t, t->values_final[0]);
 
   recalcData(t);



More information about the Bf-blender-cvs mailing list