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


C++ UMovieSceneTrack::GetTrackName方法代码示例

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


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

示例1: FindTrack

UMovieSceneTrack* UMovieScene::FindTrack( TSubclassOf<UMovieSceneTrack> TrackClass, const FGuid& ObjectGuid, FName UniqueTrackName ) const
{
	UMovieSceneTrack* FoundTrack = NULL;
	check( UniqueTrackName != NAME_None && ObjectGuid.IsValid() )

	for( int32 ObjectBindingIndex = 0; ObjectBindingIndex < ObjectBindings.Num(); ++ObjectBindingIndex )
	{
		const FMovieSceneObjectBinding& ObjectBinding = ObjectBindings[ObjectBindingIndex];

		if( ObjectBinding.GetObjectGuid() == ObjectGuid ) 
		{
			const TArray<UMovieSceneTrack*>& Tracks = ObjectBinding.GetTracks();
			for( int32 TrackIndex = 0; TrackIndex < Tracks.Num(); ++TrackIndex )
			{
				UMovieSceneTrack* Track = Tracks[TrackIndex];
				if( Track->GetClass() == TrackClass && Track->GetTrackName() == UniqueTrackName )
				{
					FoundTrack = Track;
					break;
				}
			}
		}
	}
	
	return FoundTrack;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:26,代码来源:MovieScene.cpp

示例2: MakeShareable

TSharedRef<ISequencerSection> F2DTransformTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track )
{
	check( SupportsType( SectionObject.GetOuter()->GetClass() ) );

	UClass* SectionClass = SectionObject.GetOuter()->GetClass();
	return MakeShareable( new F2DTransformSection( SectionObject, Track.GetTrackName() ) );
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:7,代码来源:Sequencer2DTransformTrackEditor.cpp

示例3: Update

void FSequencerNodeTree::Update()
{
	// @todo Sequencer - This update pass is too aggressive.  Some nodes may still be valid
	Empty();

	UMovieScene* MovieScene = Sequencer.GetFocusedMovieSceneSequence()->GetMovieScene();

	TArray< TSharedRef<FSequencerDisplayNode> > NewRootNodes;

	// Get the master tracks  so we can get sections from them
	const TArray<UMovieSceneTrack*>& MasterTracks = MovieScene->GetMasterTracks();

	for( UMovieSceneTrack* Track : MasterTracks )
	{
		UMovieSceneTrack& TrackRef = *Track;

		TSharedRef<FTrackNode> SectionNode = MakeShareable( new FTrackNode( TrackRef.GetTrackName(), TrackRef, NULL, *this ) );
		NewRootNodes.Add( SectionNode );
	
		MakeSectionInterfaces( TrackRef, SectionNode );

		SectionNode->PinNode();
	}


	const TArray<FMovieSceneBinding>& Bindings = MovieScene->GetBindings();

	TMap<FGuid, const FMovieSceneBinding*> GuidToBindingMap;
	for (const FMovieSceneBinding& Binding : Bindings)
	{
		GuidToBindingMap.Add(Binding.GetObjectGuid(), &Binding);
	}

	// Make nodes for all object bindings
	TArray< TSharedRef<FSequencerDisplayNode> > NewObjectNodes;
	for( const FMovieSceneBinding& Binding : Bindings )
	{
		TSharedRef<FObjectBindingNode> ObjectBindingNode = AddObjectBinding( Binding.GetName(), Binding.GetObjectGuid(), GuidToBindingMap, NewObjectNodes );

		const TArray<UMovieSceneTrack*>& Tracks = Binding.GetTracks();

		for( UMovieSceneTrack* Track : Tracks )
		{
			UMovieSceneTrack& TrackRef = *Track;

			FName SectionName = TrackRef.GetTrackName();
			check( SectionName != NAME_None );

			TSharedRef<FTrackNode> SectionAreaNode = ObjectBindingNode->AddSectionAreaNode( SectionName, TrackRef );
			MakeSectionInterfaces( TrackRef, SectionAreaNode );
		}
	}

	struct FObjectNodeSorter
	{
		bool operator()( const TSharedRef<FSequencerDisplayNode>& A, const TSharedRef<FSequencerDisplayNode>& B ) const
		{
			if (A->GetType() == ESequencerNode::Object && B->GetType() != ESequencerNode::Object)
			{
				return true;
			}
			if (A->GetType() != ESequencerNode::Object && B->GetType() == ESequencerNode::Object)
			{
				return false;
			}
			return A->GetDisplayName().ToString() < B->GetDisplayName().ToString();
		}
	};

	NewObjectNodes.Sort( FObjectNodeSorter() );
	for (TSharedRef<FSequencerDisplayNode> NewObjectNode : NewObjectNodes)
	{
		NewObjectNode->SortChildNodes(FObjectNodeSorter());
	}

	NewRootNodes.Append(NewObjectNodes);

	// Look for a shot track.  It will always come first if it exists
	UMovieSceneTrack* ShotTrack = MovieScene->GetShotTrack();
	if( ShotTrack )
	{
		TSharedRef<FTrackNode> SectionNode = MakeShareable( new FTrackNode( ShotTrack->GetTrackName(), *ShotTrack, NULL, *this ) );

		// Shot track always comes first
		RootNodes.Add( SectionNode );

		MakeSectionInterfaces( *ShotTrack, SectionNode );

		SectionNode->PinNode();
	}

	// Add all other nodes after the shot track
	RootNodes.Append( NewRootNodes );

	// Set up virtual offsets, and expansion states
	float VerticalOffset = 0.f;
	for (auto& Node : RootNodes)
	{
		Node->Traverse_ParentFirst([&](FSequencerDisplayNode& InNode){

//.........这里部分代码省略.........
开发者ID:frobro98,项目名称:UnrealSource,代码行数:101,代码来源:SequencerNodeTree.cpp

示例4: MakeShareable

TSharedRef<ISequencerSection> FBytePropertyTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track )
{
	return MakeShareable( new FBytePropertySection( SectionObject, Track.GetTrackName(), Cast<UMovieSceneByteTrack>( SectionObject.GetOuter() )->GetEnum() ) );
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:4,代码来源:BytePropertyTrackEditor.cpp

示例5: MakeShareable

TSharedRef<ISequencerSection> FSubMovieSceneTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track )
{
	return MakeShareable( new FSubMovieSceneSection( GetSequencer(), SectionObject, Track.GetTrackName() ) );
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:4,代码来源:SubMovieSceneTrackEditor.cpp

示例6: FSequencerDisplayNode

FSequencerTrackNode::FSequencerTrackNode(UMovieSceneTrack& InAssociatedTrack, ISequencerTrackEditor& InAssociatedEditor, bool bInCanBeDragged, TSharedPtr<FSequencerDisplayNode> InParentNode, FSequencerNodeTree& InParentTree)
	: FSequencerDisplayNode(InAssociatedTrack.GetTrackName(), InParentNode, InParentTree)
	, AssociatedEditor(InAssociatedEditor)
	, AssociatedTrack(&InAssociatedTrack)
	, bCanBeDragged(bInCanBeDragged)
{ }
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:6,代码来源:SequencerTrackNode.cpp


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