Merging //UE4/Dev-Main@4729937 to Dev-Rendering (//UE4/Dev-Rendering)

#rb none

[CL 4730169 by Marcus Wassmer in Dev-Rendering branch]
This commit is contained in:
Marcus Wassmer
2019-01-15 18:30:06 -05:00
parent fcbd01c2a4
commit fee98d3ca5
14969 changed files with 2358857 additions and 92339 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"