当前位置: 首页>>代码示例>>C++>>正文


C++ UMovieScene::GetTimeRange方法代码示例

本文整理汇总了C++中UMovieScene::GetTimeRange方法的典型用法代码示例。如果您正苦于以下问题:C++ UMovieScene::GetTimeRange方法的具体用法?C++ UMovieScene::GetTimeRange怎么用?C++ UMovieScene::GetTimeRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UMovieScene的用法示例。


在下文中一共展示了UMovieScene::GetTimeRange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: InitSequencePlayer

void UUMGSequencePlayer::InitSequencePlayer( const UWidgetAnimation& InAnimation, UUserWidget& UserWidget )
{
    Animation = &InAnimation;

    UMovieScene* MovieScene = Animation->MovieScene;

    // Cache the time range of the sequence to determine when we stop
    TimeRange = MovieScene->GetTimeRange();

    RuntimeBindings = NewObject<UMovieSceneBindings>(this);
    RuntimeBindings->SetRootMovieScene( MovieScene );

    UWidgetTree* WidgetTree = UserWidget.WidgetTree;

    TMap<FGuid, TArray<UObject*> > GuidToRuntimeObjectMap;
    // Bind to Runtime Objects
    for (const FWidgetAnimationBinding& Binding : InAnimation.AnimationBindings)
    {
        UObject* FoundObject = Binding.FindRuntimeObject( *WidgetTree );

        if( FoundObject )
        {
            TArray<UObject*>& Objects = GuidToRuntimeObjectMap.FindOrAdd(Binding.AnimationGuid);
            Objects.Add(FoundObject);
        }
    }

    for( auto It = GuidToRuntimeObjectMap.CreateConstIterator(); It; ++It )
    {
        RuntimeBindings->AddBinding( It.Key(), It.Value() );
    }

}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:33,代码来源:UMGSequencePlayer.cpp

示例2: FindEndTimeForShot

float UMovieSceneShotTrack::FindEndTimeForShot( float StartTime )
{
	float EndTime = 0;
	bool bFoundEndTime = false;
	for( UMovieSceneSection* Section : SubMovieSceneSections )
	{
		if( Section->GetStartTime() >= StartTime )
		{
			EndTime = Section->GetStartTime();
			bFoundEndTime = true;
			break;
		}
	}

	if( !bFoundEndTime )
	{
		UMovieScene* OwnerScene = GetTypedOuter<UMovieScene>();

		// End time should just end where the movie scene ends.  Ensure it is at least the same as start time (this should only happen when the movie scene has an initial time range smaller than the start time
		EndTime = FMath::Max( OwnerScene->GetTimeRange().GetUpperBoundValue(), StartTime );
	}

			
	if( StartTime == EndTime )
	{
		// Give the shot a reasonable length of time to start out with.  A 0 time shot is not usable
		EndTime = StartTime + .5f;
	}

	return EndTime;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:31,代码来源:MovieSceneShotTrack.cpp


注:本文中的UMovieScene::GetTimeRange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。