Copying //UE4/Dev-Anim to Main (//UE4/Main)

[FYI] Laurent.Delayen, Thomas.Sarkanen
#rb: none
#lockdown thomas.sarkanen

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: lina.halper
#ROBOMERGE-SOURCE: CL 4715449 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4715461 by lina halper in Dev-Networking branch]
This commit is contained in:
lina halper
2019-01-11 22:36:30 -05:00
parent ca640d037d
commit 76003579dd
124 changed files with 7006 additions and 8008 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"