Description

The trim process inserts keys at the start or end of the range depending if you specify Trim Left or Right, I'm finding that Trim right is inserting a key at the end of the section that is incorrect.

Ie. my initial Section contains 2 keys, T=-70,V=0 and T=1314,V=1901

If I TrimLeft at Time 1173 I get a key inserted at T=1173 with a value of 1689.5, which is correct.

If I then TrimRight at Time 1226 I get a value inserted at 1226 with a value of 1738.03, this is wrong, value should be 1769.

Also All keys added by the trim command are set to Cubic(Auto) with there in out tangents being 0 (horizontal), so the resulting curve follows an S shape rather than the Linear path the original source curve follows.

Steps to Reproduce

Steps to Reproduce

  • Create a transform Animation track in sequencer and in my Case Key the yaw value with Frame -70, value 0 and Frame 1314, value 1901, ensure curve is set as Linear interpolation.
  • Write code to use get the transform track and its single section, Duplicate Section then use TrimSection to trim keys outside set ranges, set Section range to new trimmed range, add section to track and delete the original section.
  • Simple code snippet I'm ussing to create a duplicate of the original Section containing 2 keys and then trimming it to a new range:-
  • UMovieSceneSection* NewSection = DuplicateObject<UMovieSceneSection>(Section, AnimTrack);
  • FQualifiedFrameTime PrevQFT(PrevScaledFrame, DestRate);
  • FQualifiedFrameTime QFT(TrimEnd, DestRate);
  • NewSection->TrimSection(PrevQFT, true, true); // delete all keys to left of new section start
  • NewSection->TrimSection(QFT, false, true); // delete all keys to right of new section end
  • TRange<FFrameNumber> CamRange = TRange<FFrameNumber>(PrevScaledFrame, TrimEnd);
  • NewSection->SetRange(CamRange);

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-358458 in the post.

0
Login to Vote

Unresolved
ComponentUE - Anim - Sequencer
Affects Versions5.6
Target Fix5.8
CreatedDec 17, 2025
UpdatedDec 17, 2025
View Jira Issue