Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)

#rb none
#rnx

[CL 4716250 by Ben Marsh in Dev-Build branch]
This commit is contained in:
Ben Marsh
2019-01-12 13:09:07 -05:00
parent a4b8dd408d
commit e26dfd2100
166 changed files with 9142 additions and 9705 deletions

View File

@@ -12,6 +12,9 @@
#include "Modules/ModuleManager.h"
#include "PropertyEditorModule.h"
#include "SAnimationModifierContentBrowserWindow.h"
#include "Framework/Application/SlateApplication.h"
#include "Interfaces/IMainFrameModule.h"
#define LOCTEXT_NAMESPACE "AnimationModifiersModule"
@@ -65,4 +68,31 @@ void FAnimationModifiersModule::ShutdownModule()
RegisteredApplicationModes.Empty();
}
void FAnimationModifiersModule::ShowAddAnimationModifierWindow(const TArray<UAnimSequence*>& InSequences)
{
TSharedPtr<SAnimationModifierContentBrowserWindow> WindowContent;
TSharedRef<SWindow> Window = SNew(SWindow)
.Title(LOCTEXT("WindowTitle", "Add Animation Modifier(s)"))
.SizingRule(ESizingRule::UserSized)
.ClientSize(FVector2D(500, 500));
Window->SetContent
(
SAssignNew(WindowContent, SAnimationModifierContentBrowserWindow)
.WidgetWindow(Window)
.AnimSequences(InSequences)
);
TSharedPtr<SWindow> ParentWindow;
if (FModuleManager::Get().IsModuleLoaded("MainFrame"))
{
IMainFrameModule& MainFrame = FModuleManager::LoadModuleChecked<IMainFrameModule>("MainFrame");
ParentWindow = MainFrame.GetParentWindow();
}
FSlateApplication::Get().AddModalWindow(Window, ParentWindow, false);
}
#undef LOCTEXT_NAMESPACE // "AnimationModifiersModule"