From b1d017581b5f67b8b406816c7cbff3bf93344633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20M=C3=BCller=20=28Andy=20Miira=29?= Date: Sat, 2 Mar 2024 18:57:19 -0300 Subject: [PATCH 1/5] FlowEditor module: Fix UE 5.3 compilation errors --- .../Private/Asset/FlowDiffControl.cpp | 7 +++++-- .../Private/MovieScene/FlowTrackEditor.cpp | 21 ++++++++++++------- .../Private/MovieScene/FlowTrackEditor.h | 7 +++---- .../FlowEditor/Public/Asset/FlowDiffControl.h | 5 ++--- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/OmegaGameFramework/Source/FlowEditor/Private/Asset/FlowDiffControl.cpp b/OmegaGameFramework/Source/FlowEditor/Private/Asset/FlowDiffControl.cpp index 79ad3583..71f8a282 100644 --- a/OmegaGameFramework/Source/FlowEditor/Private/Asset/FlowDiffControl.cpp +++ b/OmegaGameFramework/Source/FlowEditor/Private/Asset/FlowDiffControl.cpp @@ -7,7 +7,6 @@ #include "EdGraph/EdGraph.h" #include "GraphDiffControl.h" -#include "Launch/Resources/Version.h" #include "SBlueprintDiff.h" #define LOCTEXT_NAMESPACE "SFlowDiffControl" @@ -170,6 +169,7 @@ void FFlowGraphToDiff::BuildDiffSourceArray() FoundDiffs->Empty(); FGraphDiffControl::DiffGraphs(GraphOld, GraphNew, *FoundDiffs); +#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION < 3 struct SortDiff { bool operator ()(const FDiffSingleResult& A, const FDiffSingleResult& B) const @@ -179,6 +179,9 @@ void FFlowGraphToDiff::BuildDiffSourceArray() }; Sort(FoundDiffs->GetData(), FoundDiffs->Num(), SortDiff()); +#else + Algo::SortBy(*FoundDiffs, &FDiffSingleResult::Diff); +#endif DiffListSource.Empty(); for (const FDiffSingleResult& Diff : *FoundDiffs) @@ -192,4 +195,4 @@ void FFlowGraphToDiff::OnGraphChanged(const FEdGraphEditAction& Action) const DiffWidget->OnGraphChanged(this); } -#undef LOCTEXT_NAMESPACE \ No newline at end of file +#undef LOCTEXT_NAMESPACE diff --git a/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.cpp b/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.cpp index 0d7c4d28..1f65d18b 100644 --- a/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.cpp +++ b/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.cpp @@ -1,7 +1,7 @@ // Copyright https://github.com/MothCocoon/FlowGraph/graphs/contributors -#include "FlowTrackEditor.h" -#include "FlowSection.h" +#include "MovieScene/FlowTrackEditor.h" +#include "MovieScene/FlowSection.h" #include "MovieScene/MovieSceneFlowRepeaterSection.h" #include "MovieScene/MovieSceneFlowTrack.h" @@ -65,7 +65,7 @@ void FFlowTrackEditor::AddFlowSubMenu(FMenuBuilder& MenuBuilder) void FFlowTrackEditor::BuildAddTrackMenu(FMenuBuilder& MenuBuilder) { UMovieSceneSequence* RootMovieSceneSequence = GetSequencer()->GetRootMovieSceneSequence(); - FMovieSceneSequenceEditor* SequenceEditor = FMovieSceneSequenceEditor::Find(RootMovieSceneSequence); + const FMovieSceneSequenceEditor* SequenceEditor = FMovieSceneSequenceEditor::Find(RootMovieSceneSequence); if (SequenceEditor && SequenceEditor->SupportsEvents(RootMovieSceneSequence)) { @@ -144,7 +144,7 @@ const FSlateBrush* FFlowTrackEditor::GetIconBrush() const return FAppStyle::GetBrush("Sequencer.Tracks.Event"); } -void FFlowTrackEditor::HandleAddFlowTrackMenuEntryExecute(UClass* SectionType) +void FFlowTrackEditor::HandleAddFlowTrackMenuEntryExecute(UClass* SectionType) const { UMovieScene* FocusedMovieScene = GetFocusedMovieScene(); @@ -163,7 +163,12 @@ void FFlowTrackEditor::HandleAddFlowTrackMenuEntryExecute(UClass* SectionType) TArray NewTracks; +#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION < 2 UMovieSceneFlowTrack* NewMasterTrack = FocusedMovieScene->AddMasterTrack(); +#else + UMovieSceneFlowTrack* NewMasterTrack = FocusedMovieScene->AddTrack(); +#endif + NewTracks.Add(NewMasterTrack); if (GetSequencer().IsValid()) { @@ -179,12 +184,12 @@ void FFlowTrackEditor::HandleAddFlowTrackMenuEntryExecute(UClass* SectionType) } } -void FFlowTrackEditor::CreateNewSection(UMovieSceneTrack* Track, int32 RowIndex, UClass* SectionType, bool bSelect) const +void FFlowTrackEditor::CreateNewSection(UMovieSceneTrack* Track, const int32 RowIndex, UClass* SectionType, const bool bSelect) const { - TSharedPtr SequencerPtr = GetSequencer(); + const TSharedPtr SequencerPtr = GetSequencer(); if (SequencerPtr.IsValid()) { - UMovieScene* FocusedMovieScene = GetFocusedMovieScene(); + const UMovieScene* FocusedMovieScene = GetFocusedMovieScene(); const FQualifiedFrameTime CurrentTime = SequencerPtr->GetLocalTime(); FScopedTransaction Transaction(LOCTEXT("CreateNewFlowSectionTransactionText", "Add Flow Section")); @@ -218,7 +223,7 @@ void FFlowTrackEditor::CreateNewSection(UMovieSceneTrack* Track, int32 RowIndex, } else { - const float DefaultLengthInSeconds = 5.f; + constexpr float DefaultLengthInSeconds = 5.f; NewSectionRange = TRange(CurrentTime.Time.FrameNumber, CurrentTime.Time.FrameNumber + (DefaultLengthInSeconds * SequencerPtr->GetFocusedTickResolution()).FloorToFrame()); } diff --git a/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.h b/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.h index 6e7fa7ed..2316db26 100644 --- a/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.h +++ b/OmegaGameFramework/Source/FlowEditor/Private/MovieScene/FlowTrackEditor.h @@ -2,8 +2,7 @@ #pragma once -#include "CoreMinimal.h" -#include "Sequencer/Public/ISequencer.h" +#include "Editor/Sequencer/Public/ISequencer.h" #include "MovieSceneTrack.h" #include "ISequencerSection.h" #include "ISequencerTrackEditor.h" @@ -14,7 +13,7 @@ class FMenuBuilder; /** * A property track editor for named events. */ -class FFlowTrackEditor final : public FMovieSceneTrackEditor +class FLOWEDITOR_API FFlowTrackEditor : public FMovieSceneTrackEditor { public: /** @@ -47,7 +46,7 @@ class FFlowTrackEditor final : public FMovieSceneTrackEditor void AddFlowSubMenu(FMenuBuilder& MenuBuilder); /** Callback for executing the "Add Event Track" menu entry. */ - void HandleAddFlowTrackMenuEntryExecute(UClass* SectionType); + void HandleAddFlowTrackMenuEntryExecute(UClass* SectionType) const; void CreateNewSection(UMovieSceneTrack* Track, int32 RowIndex, UClass* SectionType, bool bSelect) const; }; diff --git a/OmegaGameFramework/Source/FlowEditor/Public/Asset/FlowDiffControl.h b/OmegaGameFramework/Source/FlowEditor/Public/Asset/FlowDiffControl.h index e5ef2003..c62d4063 100644 --- a/OmegaGameFramework/Source/FlowEditor/Public/Asset/FlowDiffControl.h +++ b/OmegaGameFramework/Source/FlowEditor/Public/Asset/FlowDiffControl.h @@ -4,8 +4,7 @@ #include "DiffResults.h" #include "IAssetTypeActions.h" -// 5.3 #include "Editor/Kismet/Private/DiffControl.h" -#include "Kismet/Private/DiffControl.h" +#include "Editor/Kismet/Private/DiffControl.h" struct FDiffResultItem; class UEdGraph; @@ -66,4 +65,4 @@ struct FLOWEDITOR_API FFlowGraphToDiff : public TSharedFromThis Date: Sat, 2 Mar 2024 19:19:16 -0300 Subject: [PATCH 2/5] OmegaEditor module: Fix UE 5.3 compilation errors --- OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditor.cpp b/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditor.cpp index 8c3afc70..8c622a87 100644 --- a/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditor.cpp +++ b/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditor.cpp @@ -5,7 +5,7 @@ #include "Modules/ModuleInterface.h" #include "Styling/SlateStyleRegistry.h" -#include "PlacementMode/Public/IPlacementModeModule.h" +#include "Editor/PlacementMode/Public/IPlacementModeModule.h" #include "Interfaces/IPluginManager.h" #include "Runtime/Launch/Resources/Version.h" From 0c3ed62930ac177386e3e5f335b9c691ff553831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20M=C3=BCller=20=28Andy=20Miira=29?= Date: Sat, 2 Mar 2024 19:20:26 -0300 Subject: [PATCH 3/5] OmegaFlow module: Fix UE 5.3 compilation errors --- .../Source/OmegaFlow/Private/AsyncAction_LevelSequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OmegaGameFramework/Source/OmegaFlow/Private/AsyncAction_LevelSequence.cpp b/OmegaGameFramework/Source/OmegaFlow/Private/AsyncAction_LevelSequence.cpp index 6db75916..abbed6c8 100644 --- a/OmegaGameFramework/Source/OmegaFlow/Private/AsyncAction_LevelSequence.cpp +++ b/OmegaGameFramework/Source/OmegaFlow/Private/AsyncAction_LevelSequence.cpp @@ -2,7 +2,7 @@ #include "AsyncAction_LevelSequence.h" -#include "LevelSequence/Public/DefaultLevelSequenceInstanceData.h" +#include "Runtime/LevelSequence/Public/DefaultLevelSequenceInstanceData.h" void UAsyncAction_LevelSequence::Local_Play() From 0df4027f7a046ce9ceeee1df8e352a38ba053ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20M=C3=BCller=20=28Andy=20Miira=29?= Date: Sat, 2 Mar 2024 19:31:04 -0300 Subject: [PATCH 4/5] OmegaEditor module: Fix UE 5.3 compilation errors --- .../Source/OmegaEditor/Private/OmegaEditorFactories.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditorFactories.cpp b/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditorFactories.cpp index b1f3f1c1..c1f6e564 100644 --- a/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditorFactories.cpp +++ b/OmegaGameFramework/Source/OmegaEditor/Private/OmegaEditorFactories.cpp @@ -2,7 +2,7 @@ #include "OmegaEditorFactories.h" -#include "AssetRegistryModule.h" +#include "AssetRegistry/AssetRegistryModule.h" #include "BlueprintEditorModule.h" #include "DetailCategoryBuilder.h" #include "IAssetTools.h" From 60a26772975d0738b96847b27657894e74b172ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20M=C3=BCller=20=28Andy=20Miira=29?= Date: Sat, 2 Mar 2024 20:54:54 -0300 Subject: [PATCH 5/5] FileSDK module: Fix UE 5.3 compilation errors --- .../Source/FileSDK/Private/FileSDKBPLibrary.cpp | 16 ++++++++++++++-- .../FileSDK/Private/FileSDKCopyFileAsync.cpp | 12 ++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/OmegaGameFramework/Source/FileSDK/Private/FileSDKBPLibrary.cpp b/OmegaGameFramework/Source/FileSDK/Private/FileSDKBPLibrary.cpp index 5fac4e22..0c91c70f 100644 --- a/OmegaGameFramework/Source/FileSDK/Private/FileSDKBPLibrary.cpp +++ b/OmegaGameFramework/Source/FileSDK/Private/FileSDKBPLibrary.cpp @@ -166,7 +166,13 @@ void UFileSDKBPLibrary::CopyFileAsync( int ChunkSizeInKilobytes ) { FFunctionGraphTask::CreateAndDispatchWhenReady( - [=] { + [ + Source, + Destination, + ProgressCallback, + PreInfo, + ChunkSizeInKilobytes + ] { UFileSDKBPLibrary::CopyFile( Source, Destination, @@ -336,7 +342,13 @@ void UFileSDKBPLibrary::CopyDirectoryAsync( int ChunkSizeInKilobytes ) { FFunctionGraphTask::CreateAndDispatchWhenReady( - [=] { + [ + Source, + Destination, + ProgressCallback, + OverwriteDestination, + ChunkSizeInKilobytes + ] { UFileSDKBPLibrary::CopyDirectory( Source, Destination, diff --git a/OmegaGameFramework/Source/FileSDK/Private/FileSDKCopyFileAsync.cpp b/OmegaGameFramework/Source/FileSDK/Private/FileSDKCopyFileAsync.cpp index 52e6261e..009394a0 100644 --- a/OmegaGameFramework/Source/FileSDK/Private/FileSDKCopyFileAsync.cpp +++ b/OmegaGameFramework/Source/FileSDK/Private/FileSDKCopyFileAsync.cpp @@ -8,8 +8,8 @@ void UFileSDKCopyFileAsync::Activate() { if (fileInfo.bIsDirectory) { FFunctionGraphTask::CreateAndDispatchWhenReady( - [=] { - auto successful = UFileSDKBPLibrary::CopyDirectory( + [this] { + bool bSuccessful = UFileSDKBPLibrary::CopyDirectory( Source, Destination, ProgressCallback, @@ -17,7 +17,7 @@ void UFileSDKCopyFileAsync::Activate() { ChunkSizeInKilobytes ); - Completed.Broadcast(successful); + Completed.Broadcast(bSuccessful); }, TStatId(), nullptr, @@ -26,8 +26,8 @@ void UFileSDKCopyFileAsync::Activate() { } else { FFileSDKDelegatePreInfo PreInfo; FFunctionGraphTask::CreateAndDispatchWhenReady( - [=] { - auto successful = UFileSDKBPLibrary::CopyFile( + [this, PreInfo] { + bool bSuccessful = UFileSDKBPLibrary::CopyFile( Source, Destination, ProgressCallback, @@ -36,7 +36,7 @@ void UFileSDKCopyFileAsync::Activate() { OverwriteDestination ); - Completed.Broadcast(successful); + Completed.Broadcast(bSuccessful); }, TStatId(), nullptr,