UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMovieSceneInverseSequenceTransform Struct Reference

#include <MovieSceneSequenceTransform.h>

Public Member Functions

bool IsLinear () const
 
FMovieSceneTimeTransform AsLinear () const
 
MOVIESCENE_API TOptional< FFrameTimeTryTransformTime (FFrameTime Time, const FMovieSceneTransformBreadcrumbs &Breadcrumbs) const
 
MOVIESCENE_API TOptional< FFrameTimeTryTransformTime (FFrameTime Time, const FMovieSceneTransformBreadcrumbs &Breadcrumbs, const UE::MovieScene::FInverseTransformTimeParams &Params) const
 
MOVIESCENE_API TOptional< FFrameTimeTryTransformTime (FFrameTime Time) const
 
MOVIESCENE_API TOptional< FFrameTimeTryTransformTime (FFrameTime Time, const UE::MovieScene::FInverseTransformTimeParams &Params) const
 
MOVIESCENE_API bool TransformTimeWithinRange (FFrameTime Time, const TFunctionRef< bool(FFrameTime)> &Visitor, const FMovieSceneTransformBreadcrumbs &StartBreadcrumbs, const FMovieSceneTransformBreadcrumbs &EndBreadcrumbs) const
 
MOVIESCENE_API bool TransformFiniteRangeWithinRange (const TRange< FFrameTime > &Range, TFunctionRef< bool(TRange< FFrameTime >)> Visitor, const FMovieSceneTransformBreadcrumbs &StartBreadcrumbs, const FMovieSceneTransformBreadcrumbs &EndBreadcrumbs) const
 
MOVIESCENE_API FMovieSceneTimeTransform AsLegacyLinearTimeTransform () const
 

Detailed Description

The inverse of a FMovieSceneSequenceTransform representing a transformation from transformed, to untransformed space. This uses a different class and API because the algorithms for computing the inverse of non-linear are different, often more complex, and can fail. Whereas an FMovieSceneSequenceTransform can only represent a 1:1 mapping from outer to inner space, its inverse is a (sometimes empty) many:many mapping.

Consider a looping transform with a duration of 10 frames: [0, 10). Every time in the outer space maps to a time in the inner space, but the opposite is not true. Only frames 0-10 exist in the inner space, and each frame in that time maps to an infinite number of solutions in the outer space. Conversely, any inner time outside the loop range, ie, [-inf, 0)..(10, +inf] cannot be transformed into the outer space.

For this reason, the API only has functions for attempting such computations (TryTransformTime), and iterating the solutions for any given time within a range.

The inverse of an inverse transform is the original transform such that T*(1/T)=I theoretically holds true, although transform multiplication is not actually supported by the API.

Member Function Documentation

◆ AsLegacyLinearTimeTransform()

FMovieSceneTimeTransform FMovieSceneInverseSequenceTransform::AsLegacyLinearTimeTransform ( ) const

Legacy function that folds all linear transforms together. Does not account for non-linear transforms and should not be used any more.

◆ AsLinear()

FMovieSceneTimeTransform FMovieSceneInverseSequenceTransform::AsLinear ( ) const
inline

Cast this transform to a linear transformation, provided IsLinear() is true.

◆ IsLinear()

bool FMovieSceneInverseSequenceTransform::IsLinear ( ) const
inline

Returns whether this is a linear transform involving no non-linear components

◆ TransformFiniteRangeWithinRange()

bool FMovieSceneInverseSequenceTransform::TransformFiniteRangeWithinRange ( const TRange< FFrameTime > &  Range,
TFunctionRef< bool(TRange< FFrameTime >)>  Visitor,
const FMovieSceneTransformBreadcrumbs StartBreadcrumbs,
const FMovieSceneTransformBreadcrumbs EndBreadcrumbs 
) const

Transforms a finite range in the transformed space, to non-empty ranges in untransformed space. For each solution that exists in the untransformed space, Visitor will be invoked and its result defines whether the algorithm continues (true) or terminates early (false).

Parameters
RangeThe range in transformed space to convert to untransformed space.
VisitorA functor to invoke for every solution that exists within the range. Returning true will allow the algorithm to continue, false will cause it to terminate early.
StartBreadCrumbsA breadcrumb trail for the start of the allowable range to solve within.
EndBreadCrumbsA breadcrumb trail for the end of the allowable range to solve within.
Returns
False if any invocation of Visitor returned false, true otherwise (if there were no solutions, or every invocation of Visitor returned true).

◆ TransformTimeWithinRange()

bool FMovieSceneInverseSequenceTransform::TransformTimeWithinRange ( FFrameTime  Time,
const TFunctionRef< bool(FFrameTime)> &  Visitor,
const FMovieSceneTransformBreadcrumbs StartBreadcrumbs,
const FMovieSceneTransformBreadcrumbs EndBreadcrumbs 
) const

Transforms a time from transformed to untransformed space within a finite range specified by two breadcrumb trails. For each solution that exists in the untransformed space, Visitor will be invoked and its result defines whether the algorithm continues (true) or terminates early (false).

Parameters
TimeThe transformed time to convert to untransformed space
VisitorA functor to invoke for every solution that exists within the range. Returning true will allow the algorithm to continue, false will cause it to terminate early.
StartBreadCrumbsA breadcrumb trail for the start of the allowable range to solve within.
EndBreadCrumbsA breadcrumb trail for the end of the allowable range to solve within.
Returns
False if any invocation of Visitor returned false, true otherwise (if there were no solutions, or every invocation of Visitor returned true).

◆ TryTransformTime() [1/4]

TOptional< FFrameTime > FMovieSceneInverseSequenceTransform::TryTransformTime ( FFrameTime  Time) const

Fallback overload that does not require a breadcrumb trail if one is not available.

Attempt to transform the specified transformed time into its untransformed space. This function can fail if the time does not map to any other times in the untransformed space.

Note
This overload may yield unexpected times due to the lack of breadcrumb context. Breadcrumbs should be used if possible.
Parameters
TimeThe transformed time to convert to untransformed space
Returns
The time in untransformed space if succesful, or an empty optional otherwise.

◆ TryTransformTime() [2/4]

TOptional< FFrameTime > FMovieSceneInverseSequenceTransform::TryTransformTime ( FFrameTime  Time,
const FMovieSceneTransformBreadcrumbs Breadcrumbs 
) const

Attempt to transform the specified transformed time into its untransformed space. This function can fail if the time does not map to any other times in the untransformed space.

Parameters
TimeThe transformed time to convert to untransformed space
BreadcrumbsA trail of breadcrumbs that lead us from untransformed to transformed space. The algorithm will attempt to find the closest solution to each breadcrumb as it goes.
Returns
The time in untransformed space if succesful, or an empty optional otherwise.

◆ TryTransformTime() [3/4]

TOptional< FFrameTime > FMovieSceneInverseSequenceTransform::TryTransformTime ( FFrameTime  Time,
const FMovieSceneTransformBreadcrumbs Breadcrumbs,
const UE::MovieScene::FInverseTransformTimeParams Params 
) const

Attempt to transform the specified transformed time into its untransformed space. This function can fail if the time does not map to any other times in the untransformed space.

Parameters
TimeThe transformed time to convert to untransformed space
BreadcrumbsA trail of breadcrumbs that lead us from untransformed to transformed space. The algorithm will attempt to find the closest solution to each breadcrumb as it goes.
ParamsAdditional parameters that control the algotihm, such as whether it can look forwards, backwards, or across cycles/loops.
Returns
The time in untransformed space if succesful, or an empty optional otherwise.

◆ TryTransformTime() [4/4]

TOptional< FFrameTime > FMovieSceneInverseSequenceTransform::TryTransformTime ( FFrameTime  Time,
const UE::MovieScene::FInverseTransformTimeParams Params 
) const

Fallback overload that does not require a breadcrumb trail if one is not available.

Attempt to transform the specified transformed time into its untransformed space. This function can fail if the time does not map to any other times in the untransformed space.

Note
This overload may yield unexpected times due to the lack of breadcrumb context. Breadcrumbs should be used if possible.
Parameters
TimeThe transformed time to convert to untransformed space
ParamsAdditional parameters that control the algotihm, such as whether it can look forwards, backwards, or across cycles/loops.
Returns
The time in untransformed space if succesful, or an empty optional otherwise.

The documentation for this struct was generated from the following files: