本文整理汇总了C++中UMovieScene::GetShotTrack方法的典型用法代码示例。如果您正苦于以下问题:C++ UMovieScene::GetShotTrack方法的具体用法?C++ UMovieScene::GetShotTrack怎么用?C++ UMovieScene::GetShotTrack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMovieScene
的用法示例。
在下文中一共展示了UMovieScene::GetShotTrack方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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){
//.........这里部分代码省略.........