Sequencer bug when trimming or splitting a timescaled shot

Hi,

I recently came across a weird behavior in Sequencer :

Spliting a shot which TimeScale is not 1.0 introduces an offset in the newly created shot.

I dug into the code and found the culprit to be in the SplitSection function in MovieSceneSubSection.cpp :

float NewStartOffset = (SplitTime - InitialStartTime) / Parameters.TimeScale;

should be :

float NewStartOffset = (SplitTime - InitialStartTime) * Parameters.TimeScale;

The same error is repeated in the TrimSection function.

I checked against the 4.20 repository and the code changed quite a bit but the two divisions seem to remain so I assume the behaviour of SplitSection and TrimSection is buggy.

Could you confirm the fix I propose is correct, please?

Thanks!

Thanks for tracking this down. Your fix appears correct. I’ll get it fixed for the next release.