# FMovieSceneInverseSequenceTransform::TransformFiniteRangeWithinRange incorrect for looping transforms 

**URL:** <https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [November 26, 2025, 3:59pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279 "2025-11-26T15:59:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 26, 2025, 3:59pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279/1 "2025-11-26T15:59:03Z")

</div>

When using _FMovieSceneInverseSequenceTransform::TransformFiniteRangeWithinRange_ on the inverse of a looping transform, incorrect ranges are visited. This appears to be an issue with how that function handles partial loops included at the start or end of the inner range. See the repro steps for more detail.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 26, 2025, 3:59pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279/2 "2025-11-26T15:59:08Z")

</div>

**Steps to Reproduce**

When using _FMovieSceneInverseSequenceTransform::TransformFiniteRangeWithinRange_ on the inverse of a looping transform, incorrect ranges are visited. I’ve attached a commandlet class that reproduces this issue in Unreal 5.7.0, the gist of which is reproduced below:

```auto
#include "Evaluation/MovieSceneSequenceTransform.h"
#include "MovieSceneTransformTypes.h"
#include "Sections/MovieSceneSectionTimingParameters.h"
 
 
int32 ULoopingTransformCommandlet::Main(const FString&)
{
	const FFrameRate TickResolution; // Default 60000 ticks per second (and we'll use the same for inner and outer)
 
	// Outer range is [0, 180000), i.e. [0, 3) seconds
	const TRange OuterRange(TRangeBound<FFrameNumber>::Inclusive(0), TRangeBound<FFrameNumber>::Exclusive(180000));
 
	// Inner range is [0, 60000), i.e. [0, 1) seconds
	const TRange InnerRange(TRangeBound<FFrameNumber>::Inclusive(0), TRangeBound<FFrameNumber>::Exclusive(60000));
 
	FMovieSceneSectionTimingParametersFrames TimingParams;
	TimingParams.bLoop = true;
	TimingParams.FirstLoopStartOffset = FFrameNumber(30000); // Start of section enters half-way through the loop
 
	const FMovieSceneSequenceTransform Transform = TimingParams.MakeTransform(TickResolution, OuterRange,
		TickResolution, InnerRange);
	const FMovieSceneInverseSequenceTransform InverseTransform = Transform.Inverse();
 
	// The transform should map these four ranges of the outer 3 second section:
	//
	// |<-------------------------------->||<-------------------------------->||<-------------------------------->|
	// [ 0, 30000 )
	// [ 30000, 90000 )
	// [ 90000, 150000 )
	// [ 150000, 180000 )
	//
	// ... onto these ranges of the inner 1 second section:
	//
	// |<-------------------------------->|
	// [ 30000, 60000 )
	// [ 0, 60000 )
	// [ 0, 60000 )
	// [ 0, 30000 )
 
// Some test code omitted for brevity. See full commandlet class in uploaded .zip
 
	// This should log the four ranges in the outer section that can be mapped onto the inner section:
	//
	// |<-------------------------------->||<-------------------------------->||<-------------------------------->|
	// [ 0, 30000 )
	// [ 30000, 90000 )
	// [ 90000, 150000 )
	// [ 150000, 180000 )
	//
	// But in my testing, the first range is omitted and the last range incorrectly has an open upper bound.
	// i.e. we expect to see: [0,30000), [30000,90000), [90000,150000), [150000,180000)
	// but actually see: [30000,90000), [90000,150000), [150000,+inf]
	InverseTransform.TransformFiniteRangeWithinRange(TraversedHull, LogFrameTimeRangeAndReturnTrue,
		StartBreadcrumbs, EndBreadcrumbs);
 
	return 0;
}

```

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [November 26, 2025, 4:01pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279/3 "2025-11-26T16:01:37Z")

</div>

Reattaching the repro zip file, as it does not appear to be attached to the above message.

---

<div class="post-metadata">

**Author:** ![DDeVoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddevoe/32/1000886_2.png) [@DDeVoe](https://forums.unrealengine.com/u/DDeVoe)\
**Post date:** [December 3, 2025, 9:53pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279/4 "2025-12-03T21:53:29Z")

</div>

Hey folks, I’m going to pass this case over to Ludo here. He has been discussing this with the rest of the dev team. Apologies for the delay, with the holiday we weren’t able to respond right away.

Dustin

---

<div class="post-metadata">

**Author:** ![ludovicchabant](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ludovicchabant/32/1066323_2.png) [@ludovicchabant](https://forums.unrealengine.com/u/ludovicchabant)\
**Post date:** [December 4, 2025, 5:05pm UTC](https://forums.unrealengine.com/t/fmoviesceneinversesequencetransform-transformfiniterangewithinrange-incorrect-for-looping-transforms/2689279/5 "2025-12-04T17:05:19Z")

</div>

Hi! Yeah we’re figuring out what exactly this function should be returning in this case… what is your use-case for using this function? Like, what are you going to do with the returned time ranges?
