diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-01-28 13:54:27 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-01-29 13:27:20 +0300 |
commit | 67a60504990a6203304527a8bdb3a09041ca28d0 (patch) | |
tree | a92ce0e5409ec235e2458e52244605d9bd09305a /source/blender/editors/transform/transform.c | |
parent | 9c062ac310a08909c42fa2be21b8093f492ba668 (diff) |
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
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 */ |