• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ UMovieScene类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FindObject

UObject* FMovieSceneSequenceInstance::FindObject(const FGuid& ObjectId, const IMovieScenePlayer& Player) const
{
	if(MovieSceneSequence.IsValid())
	{
		// Attempt to find a possessable first
		UMovieScene* MovieScene = MovieSceneSequence->GetMovieScene();
		if (MovieScene != nullptr)
		{
			FMovieScenePossessable* Possessable = MovieScene->FindPossessable(ObjectId);
			if (Possessable)
			{
				UObject* ParentObject = Player.GetPlaybackContext();
				if (Possessable->GetParent().IsValid())
				{
					ParentObject = FindObject(Possessable->GetParent(), Player);
				}

				return MovieSceneSequence->FindPossessableObject(ObjectId, ParentObject);
			}
			else
			{
				return FindSpawnedObject(ObjectId);
			}
		}
	}

	return nullptr;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:28,代码来源:MovieSceneSequenceInstance.cpp


示例2: 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


示例3: Empty

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

	UMovieScene* MovieScene = Sequencer.GetFocusedMovieScene();

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

	for( int32 TrackIndex = 0; TrackIndex < MasterTracks.Num(); ++TrackIndex )
	{
		UMovieSceneTrack& Track = *MasterTracks[TrackIndex];

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

		SectionNode->PinNode();
	}


	const TArray<FMovieSceneObjectBinding>& ObjectBindings = MovieScene->GetObjectBindings();

	// Make nodes for all object bindings
	for( int32 BindingIndex = 0; BindingIndex < ObjectBindings.Num(); ++BindingIndex )
	{
		TSharedRef<FObjectBindingNode> ObjectBindingNode = AddObjectBinding( ObjectBindings[BindingIndex].GetDisplayName(), ObjectBindings[BindingIndex].GetObjectGuid() );

		const TArray<UMovieSceneTrack*>& Tracks = ObjectBindings[BindingIndex].GetTracks();

		for( int32 TrackIndex = 0; TrackIndex < Tracks.Num(); ++TrackIndex )
		{
			UMovieSceneTrack& Track = *Tracks[TrackIndex];

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

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

	}

	struct FRootNodeSorter
	{
		bool operator()( const TSharedRef<FSequencerDisplayNode>& A, const TSharedRef<FSequencerDisplayNode>& B ) const
		{
			return A->GetType() == ESequencerNode::Object ? false : true;
		}
	};

	// Sort so that master tracks appear before object tracks
	RootNodes.Sort( FRootNodeSorter() );

	// Re-filter the tree after updating 
	// @todo Sequencer - Newly added sections may need to be visible even when there is a filter
	FilterNodes( FilterString );
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:60,代码来源:SequencerNodeTree.cpp


示例4: StopRecording

bool UActorRecording::StopRecording(ULevelSequence* CurrentSequence)
{
	FString ActorName;
	if(CurrentSequence)
	{
		UMovieScene* MovieScene = CurrentSequence->GetMovieScene();
		check(MovieScene);

		FMovieSceneSpawnable* Spawnable = MovieScene->FindSpawnable(Guid);
		if(Spawnable)
		{
			ActorName = Spawnable->GetName();
		}
	}

	FScopedSlowTask SlowTask((float)SectionRecorders.Num() + 1.0f, FText::Format(NSLOCTEXT("SequenceRecorder", "ProcessingActor", "Processing Actor {0}"), FText::FromString(ActorName)));

	// stop property recorders
	for(auto& SectionRecorder : SectionRecorders)
	{
		SlowTask.EnterProgressFrame();

		SectionRecorder->FinalizeSection();
	}

	SlowTask.EnterProgressFrame();

	SectionRecorders.Empty();

	return true;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:31,代码来源:ActorRecording.cpp


示例5: 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


示例6: GetSectionSnapTimes

void FSequencerDragOperation::GetSectionSnapTimes(TArray<float>& OutSnapTimes, UMovieSceneSection* Section, TSharedPtr<FTrackNode> SequencerNode, bool bIgnoreOurSectionCustomSnaps)
{
	// @todo Sequencer handle dilation snapping better

	// Collect all the potential snap times from other section borders
	const TArray< TSharedRef<ISequencerSection> >& Sections = SequencerNode->GetSections();
	for (int32 SectionIndex = 0; SectionIndex < Sections.Num(); ++SectionIndex)
	{
		const UMovieSceneSection* InSection = Sections[SectionIndex]->GetSectionObject();
		bool bIsThisSection = Section == InSection;
		if (!bIgnoreOurSectionCustomSnaps || !bIsThisSection)
		{
			InSection->GetSnapTimes(OutSnapTimes, Section != InSection);
		}
	}

	// snap to director track if it exists, and we are not the director track
	UMovieSceneTrack* OuterTrack = Cast<UMovieSceneTrack>(Section->GetOuter());
	UMovieScene* MovieScene = Cast<UMovieScene>(OuterTrack->GetOuter());
	UMovieSceneTrack* ShotTrack = MovieScene->FindMasterTrack(UMovieSceneShotTrack::StaticClass());
	if (ShotTrack && OuterTrack != ShotTrack)
	{
		const TArray<UMovieSceneSection*>& ShotSections = ShotTrack->GetAllSections();
		for (int32 SectionIndex = 0; SectionIndex < ShotSections.Num(); ++SectionIndex)
		{
			auto Shot = ShotSections[SectionIndex];
			Shot->GetSnapTimes(OutSnapTimes, true);
		}
	}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:30,代码来源:SectionDragOperations.cpp


示例7: SpawnActorsForMovie

void UActorAnimationPlayer::SpawnActorsForMovie(TSharedRef<FMovieSceneSequenceInstance> MovieSceneInstance)
{
	UWorld* WorldPtr = World.Get();

	if (WorldPtr == nullptr)
	{
		return;
	}

	UMovieScene* MovieScene = MovieSceneInstance->GetSequence()->GetMovieScene();

	if (MovieScene == nullptr)
	{
		return;
	}

	TArray<FSpawnedActorInfo>* FoundSpawnedActors = InstanceToSpawnedActorMap.Find(MovieSceneInstance);

	if (FoundSpawnedActors != nullptr)
	{
		// Remove existing spawned actors for this movie
		DestroyActorsForMovie( MovieSceneInstance );
	}

	TArray<FSpawnedActorInfo>& SpawnedActorList = InstanceToSpawnedActorMap.Add(MovieSceneInstance, TArray<FSpawnedActorInfo>());

	for (auto SpawnableIndex = 0; SpawnableIndex < MovieScene->GetSpawnableCount(); ++SpawnableIndex)
	{
		auto& Spawnable = MovieScene->GetSpawnable(SpawnableIndex);
		UClass* GeneratedClass = Spawnable.GetClass();
		
		if ((GeneratedClass == nullptr) || !GeneratedClass->IsChildOf(AActor::StaticClass()))
		{
			continue;
		}

		AActor* ActorCDO = CastChecked<AActor>(GeneratedClass->ClassDefaultObject);
		const FVector SpawnLocation = ActorCDO->GetRootComponent()->RelativeLocation;
		const FRotator SpawnRotation = ActorCDO->GetRootComponent()->RelativeRotation;

		FActorSpawnParameters SpawnInfo;
		{
			SpawnInfo.ObjectFlags = RF_NoFlags;
		}

		AActor* NewActor = WorldPtr->SpawnActor(GeneratedClass, &SpawnLocation, &SpawnRotation, SpawnInfo);

		if (NewActor)
		{	
			// Actor was spawned OK!
			FSpawnedActorInfo NewInfo;
			{
				NewInfo.RuntimeGuid = Spawnable.GetGuid();
				NewInfo.SpawnedActor = NewActor;
			}
						
			SpawnedActorList.Add(NewInfo);
		}
	}
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:60,代码来源:ActorAnimationPlayer.cpp


示例8: GetFocusedMovieScene

void FSlomoTrackEditor::HandleAddSlomoTrackMenuEntryExecute()
{
	UMovieScene* MovieScene = GetFocusedMovieScene();

	if (MovieScene == nullptr)
	{
		return;
	}

	UMovieSceneTrack* SlomoTrack = MovieScene->FindMasterTrack<UMovieSceneSlomoTrack>();

	if (SlomoTrack != nullptr)
	{
		return;
	}

	const FScopedTransaction Transaction(NSLOCTEXT("Sequencer", "AddSlomoTrack_Transaction", "Add Play Rate Track"));

	MovieScene->Modify();
		
	SlomoTrack = FindOrCreateMasterTrack<UMovieSceneSlomoTrack>().Track;
	ensure(SlomoTrack);

	UMovieSceneSection* NewSection = SlomoTrack->CreateNewSection();
	ensure(NewSection);

	SlomoTrack->AddSection(*NewSection);

	GetSequencer()->NotifyMovieSceneDataChanged();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:30,代码来源:SlomoTrackEditor.cpp


示例9: GetSequencer

void FSequencerObjectBindingNode::SetDisplayName(const FText& NewDisplayName)
{
	UMovieScene* MovieScene = GetSequencer().GetFocusedMovieSceneSequence()->GetMovieScene();

	if (MovieScene != nullptr)
	{
		MovieScene->SetObjectDisplayName(ObjectBinding, NewDisplayName);
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:SequencerObjectBindingNode.cpp


示例10: SaveExpansionState

void FSequencerNodeTree::SaveExpansionState( const FSequencerDisplayNode& Node, bool bExpanded )
{	
	// @todo Sequencer - This should be moved to the sequence level
	UMovieScene* MovieScene = Sequencer.GetFocusedMovieSceneSequence()->GetMovieScene();

	FMovieSceneEditorData& EditorData = MovieScene->GetEditorData();

	EditorData.ExpansionStates.Add( Node.GetPathName(), FMovieSceneExpansionState(bExpanded) );
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:9,代码来源:SequencerNodeTree.cpp


示例11: GetSavedExpansionState

bool FSequencerNodeTree::GetSavedExpansionState( const FSequencerDisplayNode& Node ) const
{
	// @todo Sequencer - This should be moved to the sequence level
	UMovieScene* MovieScene = Sequencer.GetFocusedMovieSceneSequence()->GetMovieScene();

	FMovieSceneEditorData& EditorData = MovieScene->GetEditorData();
	FMovieSceneExpansionState* ExpansionState = EditorData.ExpansionStates.Find( Node.GetPathName() );

	return ExpansionState ? ExpansionState->bExpanded : GetDefaultExpansionState(Node);
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:10,代码来源:SequencerNodeTree.cpp


示例12: GetFocusedMovieSceneInstance

FGuid FSequencer::GetHandleToObject( UObject* Object )
{
	TSharedRef<FMovieSceneInstance> FocusedMovieSceneInstance = GetFocusedMovieSceneInstance();
	UMovieScene* FocusedMovieScene = FocusedMovieSceneInstance->GetMovieScene();

	FGuid ObjectGuid = ObjectBindingManager->FindGuidForObject( *FocusedMovieScene, *Object );

	if (ObjectGuid.IsValid())
	{
		// Make sure that the possessable is still valid, if it's not remove the binding so new one 
		// can be created.  This can happen due to undo.
		FMovieScenePossessable* Possessable = FocusedMovieScene->FindPossessable(ObjectGuid);
		if (Possessable == nullptr )
		{
			ObjectBindingManager->UnbindPossessableObjects(ObjectGuid);
			ObjectGuid.Invalidate();
		}
	}
	
	bool bPossessableAdded = false;
	
	// If the object guid was not found attempt to add it
	// Note: Only possessed actors can be added like this
	if( !ObjectGuid.IsValid() && ObjectBindingManager->CanPossessObject( *Object ) )
	{
		// @todo sequencer: Undo doesn't seem to be working at all
		const FScopedTransaction Transaction( LOCTEXT("UndoPossessingObject", "Possess Object with MovieScene") );
		
		// Possess the object!
		{
			// Create a new possessable
			FocusedMovieScene->Modify();

			ObjectGuid = FocusedMovieScene->AddPossessable( Object->GetName(), Object->GetClass() );
			
			if ( IsShotFilteringOn() )
			{
				AddUnfilterableObject(ObjectGuid);
			}
			
			ObjectBindingManager->BindPossessableObject( ObjectGuid, *Object );
			
			bPossessableAdded = true;
		}
	}
	
	if( bPossessableAdded )
	{
		SpawnOrDestroyPuppetObjects( GetFocusedMovieSceneInstance() );
			
		NotifyMovieSceneDataChanged();
	}
	
	return ObjectGuid;
}
开发者ID:johndpope,项目名称:UE4,代码行数:55,代码来源:Sequencer.cpp


示例13: GetSavedExpansionState

bool FSequencerNodeTree::GetSavedExpansionState( const FSequencerDisplayNode& Node ) const
{
	UMovieScene* MovieScene = Sequencer.GetFocusedMovieScene();

	FMovieSceneEditorData& EditorData = MovieScene->GetEditorData();

	// Collapsed nodes are stored instead of expanded so that new nodes are expanded by default
	bool bCollapsed = EditorData.CollapsedSequencerNodes.Contains( Node.GetPathName() );

	return !bCollapsed;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:11,代码来源:SequencerNodeTree.cpp


示例14: SpawnActorsForMovie

void URuntimeMovieScenePlayer::SpawnActorsForMovie( TSharedRef<FMovieSceneInstance> MovieSceneInstance  )
{
	UWorld* WorldPtr = World.Get();
	if( WorldPtr != NULL && MovieSceneBindings != NULL )
	{
		UMovieScene* MovieScene = MovieSceneInstance->GetMovieScene();
		if( MovieScene != NULL )
		{
			TArray<FSpawnedActorInfo>* FoundSpawnedActors = InstanceToSpawnedActorMap.Find( MovieSceneInstance );
			if( FoundSpawnedActors )
			{
				// Remove existing spawned actors for this movie
				DestroyActorsForMovie( MovieSceneInstance );
			}

			TArray<FSpawnedActorInfo>& SpawnedActorList = InstanceToSpawnedActorMap.Add( MovieSceneInstance, TArray<FSpawnedActorInfo>() );

			for( auto SpawnableIndex = 0; SpawnableIndex < MovieScene->GetSpawnableCount(); ++SpawnableIndex )
			{
				auto& Spawnable = MovieScene->GetSpawnable( SpawnableIndex );

				UClass* GeneratedClass = Spawnable.GetClass();
				if ( GeneratedClass != NULL )
				{
					const bool bIsActorBlueprint = GeneratedClass->IsChildOf( AActor::StaticClass() );
					if ( bIsActorBlueprint )
					{
						AActor* ActorCDO = CastChecked< AActor >( GeneratedClass->ClassDefaultObject );

						const FVector SpawnLocation = ActorCDO->GetRootComponent()->RelativeLocation;
						const FRotator SpawnRotation = ActorCDO->GetRootComponent()->RelativeRotation;

						FActorSpawnParameters SpawnInfo;
						SpawnInfo.ObjectFlags = RF_NoFlags;
						AActor* NewActor = WorldPtr->SpawnActor( GeneratedClass, &SpawnLocation, &SpawnRotation, SpawnInfo );
						if( NewActor )
						{	
							// Actor was spawned OK!
							FSpawnedActorInfo NewInfo;
							NewInfo.RuntimeGuid = Spawnable.GetGuid();
							NewInfo.SpawnedActor = NewActor;
						
							SpawnedActorList.Add( NewInfo );
						}
					}
				}
			}
		}
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:50,代码来源:RuntimeMovieScenePlayer.cpp


示例15: GetFocusedMovieScene

UMovieSceneCameraCutTrack* FCameraCutTrackEditor::FindOrCreateCameraCutTrack()
{
	UMovieScene* FocusedMovieScene = GetFocusedMovieScene();
	UMovieSceneTrack* CameraCutTrack = FocusedMovieScene->GetCameraCutTrack();

	if (CameraCutTrack == nullptr)
	{
		const FScopedTransaction Transaction(LOCTEXT("AddCameraCutTrack_Transaction", "Add Camera Cut Track"));
		FocusedMovieScene->Modify();
		
		CameraCutTrack = FocusedMovieScene->AddCameraCutTrack(UMovieSceneCameraCutTrack::StaticClass());
	}

	return CastChecked<UMovieSceneCameraCutTrack>(CameraCutTrack);
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:15,代码来源:CameraCutTrackEditor.cpp


示例16: SaveExpansionState

void FSequencerNodeTree::SaveExpansionState( const FSequencerDisplayNode& Node, bool bExpanded )
{	
	UMovieScene* MovieScene = Sequencer.GetFocusedMovieScene();

	FMovieSceneEditorData& EditorData = MovieScene->GetEditorData();

	if( bExpanded )
	{
		EditorData.CollapsedSequencerNodes.Remove( Node.GetPathName() );
	}
	else
	{
		// Collapsed nodes are stored instead of expanded so that new nodes are expanded by default
		EditorData.CollapsedSequencerNodes.AddUnique( Node.GetPathName() ) ;
	}

}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:17,代码来源:SequencerNodeTree.cpp


示例17: UpdatePassSingle

void FMovieSceneSequenceInstance::UpdatePassSingle( EMovieSceneUpdateData& UpdateData, class IMovieScenePlayer& Player )
{
	if(MovieSceneSequence.IsValid())
	{
		// Refresh time range so that spawnables can be created if they fall within the playback range, or destroyed if not
		UMovieScene* MovieScene = MovieSceneSequence->GetMovieScene();
		TimeRange = MovieScene->GetPlaybackRange();

		TArray<TWeakObjectPtr<UObject>> NoObjects;

		// update each master track
		for( FMovieSceneInstanceMap::TIterator It( MasterTrackInstances ); It; ++It )
		{		
			if (It.Value()->HasUpdatePasses() & UpdateData.UpdatePass && It.Value() != CameraCutTrackInstance)
			{
				It.Value()->Update( UpdateData, NoObjects, Player, *this);
			}
		}

		// update tracks bound to objects
		TMap<FGuid, FMovieSceneObjectBindingInstance>::TIterator ObjectIt = ObjectBindingInstances.CreateIterator();
		for(; ObjectIt; ++ObjectIt )
		{
			FMovieSceneObjectBindingInstance& ObjectBindingInstance = ObjectIt.Value();
		
			for( FMovieSceneInstanceMap::TIterator It = ObjectBindingInstance.TrackInstances.CreateIterator(); It; ++It )
			{
				if (It.Value()->HasUpdatePasses() & UpdateData.UpdatePass && It.Value() != CameraCutTrackInstance)
				{
					It.Value()->Update( UpdateData, ObjectBindingInstance.RuntimeObjects, Player, *this );
				}
			}
		}

		// update camera cut track last to make sure spawnable cameras are there, and to override sub-shots
		if (CameraCutTrackInstance.IsValid())
		{
			if (CameraCutTrackInstance->HasUpdatePasses() & UpdateData.UpdatePass)
			{
				CameraCutTrackInstance->Update(UpdateData, NoObjects, Player, *this );
			}
		}
	}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:44,代码来源:MovieSceneSequenceInstance.cpp


示例18: NSLOCTEXT

FText UK2Node_PlayMovieScene::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
	UMovieScene* MovieScene = (MovieSceneBindings != nullptr) ? MovieSceneBindings->GetRootMovieScene() : nullptr;
	if (MovieScene == nullptr)
	{
		return NSLOCTEXT("PlayMovieSceneNode", "NodeTitleWithNoMovieScene", "Play Movie Scene (No Asset)");
	}
	// @TODO: don't know enough about this node type to comfortably assert that
	//        the MovieScene won't change after the node has spawned... until
	//        then, we'll leave this optimization off
	else //if (CachedNodeTitle.IsOutOfDate(this))
	{
		FFormatNamedArguments Args;
		Args.Add(TEXT("SceneName"), FText::FromString(MovieScene->GetName()));
		// FText::Format() is slow, so we cache this to save on performance
		CachedNodeTitle.SetCachedText(FText::Format(NSLOCTEXT("PlayMovieSceneNode", "NodeTitle", "Play Movie Scene: {SceneName}"), Args), this);
	}
	return CachedNodeTitle;
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:19,代码来源:K2Node_PlayMovieScene.cpp


示例19: FSequencerDisplayNode

FSequencerObjectBindingNode::FSequencerObjectBindingNode(FName NodeName, const FText& InDisplayName, const FGuid& InObjectBinding, TSharedPtr<FSequencerDisplayNode> InParentNode, FSequencerNodeTree& InParentTree)
	: FSequencerDisplayNode(NodeName, InParentNode, InParentTree)
	, ObjectBinding(InObjectBinding)
	, DefaultDisplayName(InDisplayName)
{
	UMovieScene* MovieScene = GetSequencer().GetFocusedMovieSceneSequence()->GetMovieScene();

	if (MovieScene->FindPossessable(ObjectBinding))
	{
		BindingType = EObjectBindingType::Possessable;
	}
	else if (MovieScene->FindSpawnable(ObjectBinding))
	{
		BindingType = EObjectBindingType::Spawnable;
	}
	else
	{
		BindingType = EObjectBindingType::Unknown;
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:20,代码来源:SequencerObjectBindingNode.cpp


示例20: GetFocusedMovieScene

void FSequencer::OnActorsDropped( const TArray<TWeakObjectPtr<AActor> >& Actors )
{
	bool bPossessableAdded = false;
	for( TWeakObjectPtr<AActor> WeakActor : Actors )
	{
		AActor* Actor = WeakActor.Get();
		if( Actor != NULL )
		{
			// Grab the MovieScene that is currently focused.  We'll add our Blueprint as an inner of the
			// MovieScene asset.
			UMovieScene* OwnerMovieScene = GetFocusedMovieScene();
			
			// @todo sequencer: Undo doesn't seem to be working at all
			const FScopedTransaction Transaction( LOCTEXT("UndoPossessingObject", "Possess Object with MovieScene") );
			
			// Possess the object!
			{
				// Create a new possessable
				OwnerMovieScene->Modify();
				
				const FGuid PossessableGuid = OwnerMovieScene->AddPossessable( Actor->GetActorLabel(), Actor->GetClass() );
				 
				if ( IsShotFilteringOn() )
				{
					AddUnfilterableObject(PossessableGuid);
				}
				
				ObjectBindingManager->BindPossessableObject( PossessableGuid, *Actor );
				
				bPossessableAdded = true;
			}
		}
	}
	
	if( bPossessableAdded )
	{
		SpawnOrDestroyPuppetObjects( GetFocusedMovieSceneInstance() );
		
		NotifyMovieSceneDataChanged();
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:41,代码来源:Sequencer.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ UMovieSceneSection类代码示例发布时间:2022-05-31
下一篇:
C++ UMetaData类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap