Page MenuHome

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

Authored by Philipp Oeser (lichtwerk) on Jan 28 2020, 11:56 AM.

Details

Summary

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].

note: I am not sure if snapping to frames should be done _after_? First
intuition was exactly that, but code above would also do the td->factor
_after_ snapping... bit obscure imho...

Diff Detail

Repository
rB Blender

Event Timeline

This would always move all keyframes

What would move all keyframes? This is a strange sentence to start with.

Apart from that nag, I can't really comment because I'm totally not familiar with the transform code. From a quick glance it looks headache-inducing (who decided that having both value and val is a good naming strategy?) but otherwise fine. The "there is AnimData" block already uses td->factor as a factor for value, so using it in the other case for val can't be all bad ;-)

Germano Cavalcante (mano-wii) requested changes to this revision.EditedJan 28 2020, 4:03 PM

This area of the code is buggy and much of it could be deduplicated.
Since you are working on it, I recommend snapping at the end, removing those if (autosnap == ...) lines and editing doAnimEdit_SnapFrame to call snapFrameTransform in these cases (SACTSNAP_TSTEP, SACTSNAP_STEP).

(Some variables could also be renamed to avoid confusion).

This revision now requires changes to proceed.Jan 28 2020, 4:03 PM

This area of the code is buggy and much of it could be deduplicated.
Since you are working on it, I recommend snapping at the end, removing those if (autosnap == ...) lines and editing doAnimEdit_SnapFrame to call snapFrameTransform in these cases (SACTSNAP_TSTEP, SACTSNAP_STEP).

(Some variables could also be renamed to avoid confusion).

Since (at least moving the snapping) would alter behavior (and would not be just a "fix"): suggest to split this into multiple commits ([1]fix [2.82], [2]cleanup [master], [3]change snapping order [master])? (happy to do this)

Since (at least moving the snapping) would alter behavior (and would not be just a "fix"): suggest to split this into multiple commits ([1]fix [2.82], [2]cleanup [master], [3]change snapping order [master])? (happy to do this)

It's OK for me.

This revision is now accepted and ready to land.Jan 28 2020, 5:54 PM

Since (at least moving the snapping) would alter behavior (and would not be just a "fix"): suggest to split this into multiple commits ([1]fix [2.82], [2]cleanup [master], [3]change snapping order [master])? (happy to do this)

It's OK for me.

Pushed the fix now, will do proper Differentials for the other stuff...