You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Static Mesh Editor changes: - Share ownership of StaticMeshViewportClient's ModeTools via the EditorModeManager member - Set up the EditorModeManager's preview scene and selected components when it's copied - Add a set of FStaticMeshEditorToolbarExtender delegates to the module (similar to FSkeletalMeshEditorToolbarExtender) - Allow adding an overlay widget to the viewport - Add a ModeUILayer member to handle mode toolkit hosting StaticMeshEditorModeling (new module): - Create a mode and toolkit with AutoLOD and LODManager tools - Add a button to the StaticMeshEditor's toolbar to toggle UMeshLODPluginEditMode #rb brooke.hubert semion.piskarev #jira UETOOL-3663 #preflight 61435ce14778fa00016a0b28 #preflight 614370e8b5a4fa00016459a0 [CL 17541979 by tyson brochu in ue5-main branch]
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StaticMeshEditorModeUILayer.h"
|
|
#include "WorkspaceMenuStructure.h"
|
|
#include "WorkspaceMenuStructureModule.h"
|
|
#include "Toolkits/IToolkit.h"
|
|
|
|
FStaticMeshEditorModeUILayer::FStaticMeshEditorModeUILayer(const IToolkitHost* InToolkitHost) :
|
|
FAssetEditorModeUILayer(InToolkitHost)
|
|
{}
|
|
|
|
void FStaticMeshEditorModeUILayer::OnToolkitHostingStarted(const TSharedRef<IToolkit>& Toolkit)
|
|
{
|
|
if (!Toolkit->IsAssetEditor())
|
|
{
|
|
FAssetEditorModeUILayer::OnToolkitHostingStarted(Toolkit);
|
|
HostedToolkit = Toolkit;
|
|
Toolkit->SetModeUILayer(SharedThis(this));
|
|
Toolkit->RegisterTabSpawners(ToolkitHost->GetTabManager().ToSharedRef());
|
|
RegisterModeTabSpawners();
|
|
OnToolkitHostReadyForUI.ExecuteIfBound();
|
|
}
|
|
}
|
|
|
|
void FStaticMeshEditorModeUILayer::OnToolkitHostingFinished(const TSharedRef<IToolkit>& Toolkit)
|
|
{
|
|
if (HostedToolkit.IsValid() && HostedToolkit.Pin() == Toolkit)
|
|
{
|
|
FAssetEditorModeUILayer::OnToolkitHostingFinished(Toolkit);
|
|
}
|
|
}
|
|
|
|
TSharedPtr<FWorkspaceItem> FStaticMeshEditorModeUILayer::GetModeMenuCategory() const
|
|
{
|
|
const IWorkspaceMenuStructure& MenuStructure = WorkspaceMenu::GetMenuStructure();
|
|
return MenuStructure.GetLevelEditorModesCategory();
|
|
}
|
|
|