[Bf-blender-cvs] [67a60504990] blender-v2.82-release: Fix T55622: Proportional editing for Gpencil/Masks in dope sheet not taking proportional size into account

Philipp Oeser noreply at git.blender.org
Wed Jan 29 11:36:22 CET 2020


Commit: 67a60504990a6203304527a8bdb3a09041ca28d0
Author: Philipp Oeser
Date:   Tue Jan 28 11:54:27 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB67a60504990a6203304527a8bdb3a09041ca28d0

Fix T55622: Proportional editing for Gpencil/Masks in dope sheet not
taking proportional size into account

Transform would always move all keyframes (e.g even when Proportional
size is 0.0).

'calculatePropRatio()' was setting td->factor correctly, but this was
not being considered in 'applyTimeTranslateValue()' if there was no
action [which greasepencil and masks do not have].

Maniphest Tasks: T55622

Differential Revision: https://developer.blender.org/D6697

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

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

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

diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 9a98a2b8a00..31ecf4f0c88 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -8777,9 +8777,10 @@ static void applyTimeTranslateValue(TransInfo *t, float value)
     /* It doesn't matter whether we apply to t->data or
      * t->data2d, but t->data2d is more convenient. */
     for (i = 0; i < tc->data_len; i++, td++, td2d++) {
-      /* it is assumed that td->extra is a pointer to the AnimData,
-       * whose active action is where this keyframe comes from
+      /* It is assumed that td->extra is a pointer to the AnimData,
+       * whose active action is where this keyframe comes from.
        * (this is only valid when not in NLA)
+       * (also: masks and gpencil dont have animadata)
        */
       AnimData *adt = (t->spacetype != SPACE_NLA) ? td->extra : NULL;
 
@@ -8810,7 +8811,7 @@ static void applyTimeTranslateValue(TransInfo *t, float value)
           val = floorf(val + 0.5f);
         }
 
-        *(td->val) = td->ival + val;
+        *(td->val) = td->ival + val * td->factor;
       }
 
       /* apply nearest snapping */



More information about the Bf-blender-cvs mailing list