Skip to content

Commit

Permalink
Merge pull request #13 from andreiagmu/main
Browse files Browse the repository at this point in the history
Merging 5.3 Error fixes into main
  • Loading branch information
StudioSyndiCatCaius authored Mar 4, 2024
2 parents b4eee30 + 60a2677 commit 6f88ac5
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 28 deletions.
16 changes: 14 additions & 2 deletions OmegaGameFramework/Source/FileSDK/Private/FileSDKBPLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ void UFileSDKBPLibrary::CopyFileAsync(
int ChunkSizeInKilobytes
) {
FFunctionGraphTask::CreateAndDispatchWhenReady(
[=] {
[
Source,
Destination,
ProgressCallback,
PreInfo,
ChunkSizeInKilobytes
] {
UFileSDKBPLibrary::CopyFile(
Source,
Destination,
Expand Down Expand Up @@ -336,7 +342,13 @@ void UFileSDKBPLibrary::CopyDirectoryAsync(
int ChunkSizeInKilobytes
) {
FFunctionGraphTask::CreateAndDispatchWhenReady(
[=] {
[
Source,
Destination,
ProgressCallback,
OverwriteDestination,
ChunkSizeInKilobytes
] {
UFileSDKBPLibrary::CopyDirectory(
Source,
Destination,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ void UFileSDKCopyFileAsync::Activate() {

if (fileInfo.bIsDirectory) {
FFunctionGraphTask::CreateAndDispatchWhenReady(
[=] {
auto successful = UFileSDKBPLibrary::CopyDirectory(
[this] {
bool bSuccessful = UFileSDKBPLibrary::CopyDirectory(
Source,
Destination,
ProgressCallback,
OverwriteDestination,
ChunkSizeInKilobytes
);

Completed.Broadcast(successful);
Completed.Broadcast(bSuccessful);
},
TStatId(),
nullptr,
Expand All @@ -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,
Expand All @@ -36,7 +36,7 @@ void UFileSDKCopyFileAsync::Activate() {
OverwriteDestination
);

Completed.Broadcast(successful);
Completed.Broadcast(bSuccessful);
},
TStatId(),
nullptr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "EdGraph/EdGraph.h"
#include "GraphDiffControl.h"
#include "Launch/Resources/Version.h"
#include "SBlueprintDiff.h"

#define LOCTEXT_NAMESPACE "SFlowDiffControl"
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -192,4 +195,4 @@ void FFlowGraphToDiff::OnGraphChanged(const FEdGraphEditAction& Action) const
DiffWidget->OnGraphChanged(this);
}

#undef LOCTEXT_NAMESPACE
#undef LOCTEXT_NAMESPACE
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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();

Expand All @@ -163,7 +163,12 @@ void FFlowTrackEditor::HandleAddFlowTrackMenuEntryExecute(UClass* SectionType)

TArray<UMovieSceneFlowTrack*> NewTracks;

#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION < 2
UMovieSceneFlowTrack* NewMasterTrack = FocusedMovieScene->AddMasterTrack<UMovieSceneFlowTrack>();
#else
UMovieSceneFlowTrack* NewMasterTrack = FocusedMovieScene->AddTrack<UMovieSceneFlowTrack>();
#endif

NewTracks.Add(NewMasterTrack);
if (GetSequencer().IsValid())
{
Expand All @@ -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<ISequencer> SequencerPtr = GetSequencer();
const TSharedPtr<ISequencer> SequencerPtr = GetSequencer();
if (SequencerPtr.IsValid())
{
UMovieScene* FocusedMovieScene = GetFocusedMovieScene();
const UMovieScene* FocusedMovieScene = GetFocusedMovieScene();
const FQualifiedFrameTime CurrentTime = SequencerPtr->GetLocalTime();

FScopedTransaction Transaction(LOCTEXT("CreateNewFlowSectionTransactionText", "Add Flow Section"));
Expand Down Expand Up @@ -218,7 +223,7 @@ void FFlowTrackEditor::CreateNewSection(UMovieSceneTrack* Track, int32 RowIndex,
}
else
{
const float DefaultLengthInSeconds = 5.f;
constexpr float DefaultLengthInSeconds = 5.f;
NewSectionRange = TRange<FFrameNumber>(CurrentTime.Time.FrameNumber, CurrentTime.Time.FrameNumber + (DefaultLengthInSeconds * SequencerPtr->GetFocusedTickResolution()).FloorToFrame());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
/**
Expand Down Expand Up @@ -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;
};
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,4 +65,4 @@ struct FLOWEDITOR_API FFlowGraphToDiff : public TSharedFromThis<FFlowGraphToDiff
FRevisionInfo RevisionNew;

FDelegateHandle OnGraphChangedDelegateHandle;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


#include "OmegaEditorFactories.h"
#include "AssetRegistryModule.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "BlueprintEditorModule.h"
#include "DetailCategoryBuilder.h"
#include "IAssetTools.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "AsyncAction_LevelSequence.h"

#include "LevelSequence/Public/DefaultLevelSequenceInstanceData.h"
#include "Runtime/LevelSequence/Public/DefaultLevelSequenceInstanceData.h"


void UAsyncAction_LevelSequence::Local_Play()
Expand Down

0 comments on commit 6f88ac5

Please sign in to comment.