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 #ROBOMERGE-AUTHOR: tyson.brochu #ROBOMERGE-SOURCE: CL 17541979 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530) [CL 17541987 by tyson brochu in ue5-release-engine-test branch]
69 lines
2.6 KiB
C++
69 lines
2.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "StaticMeshEditorModule.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "IStaticMeshEditor.h"
|
|
#include "StaticMeshEditor.h"
|
|
|
|
const FName StaticMeshEditorAppIdentifier = FName(TEXT("StaticMeshEditorApp"));
|
|
|
|
/**
|
|
* StaticMesh editor module
|
|
*/
|
|
class FStaticMeshEditorModule : public IStaticMeshEditorModule
|
|
{
|
|
public:
|
|
/** Constructor, set up console commands and variables **/
|
|
FStaticMeshEditorModule()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Called right after the module DLL has been loaded and the module object has been created
|
|
*/
|
|
virtual void StartupModule() override
|
|
{
|
|
// Make sure the advanced preview scene module is loaded
|
|
FModuleManager::Get().LoadModuleChecked("AdvancedPreviewScene");
|
|
|
|
MenuExtensibilityManager = MakeShareable(new FExtensibilityManager);
|
|
ToolBarExtensibilityManager = MakeShareable(new FExtensibilityManager);
|
|
SecondaryToolBarExtensibilityManager = MakeShareable(new FExtensibilityManager);
|
|
}
|
|
|
|
/**
|
|
* Called before the module is unloaded, right before the module object is destroyed.
|
|
*/
|
|
virtual void ShutdownModule() override
|
|
{
|
|
MenuExtensibilityManager.Reset();
|
|
ToolBarExtensibilityManager.Reset();
|
|
SecondaryToolBarExtensibilityManager.Reset();
|
|
}
|
|
|
|
/**
|
|
* Creates a new StaticMesh editor for a StaticMesh
|
|
*/
|
|
virtual TSharedRef<IStaticMeshEditor> CreateStaticMeshEditor( const EToolkitMode::Type Mode, const TSharedPtr< IToolkitHost >& InitToolkitHost, UStaticMesh* StaticMesh ) override
|
|
{
|
|
TSharedRef<FStaticMeshEditor> NewStaticMeshEditor(new FStaticMeshEditor());
|
|
NewStaticMeshEditor->InitStaticMeshEditor(Mode, InitToolkitHost, StaticMesh);
|
|
return NewStaticMeshEditor;
|
|
}
|
|
|
|
/** Gets the extensibility managers for outside entities to extend static mesh editor's menus and toolbars */
|
|
virtual TSharedPtr<FExtensibilityManager> GetMenuExtensibilityManager() override { return MenuExtensibilityManager; }
|
|
virtual TSharedPtr<FExtensibilityManager> GetToolBarExtensibilityManager() override { return ToolBarExtensibilityManager; }
|
|
virtual TSharedPtr<FExtensibilityManager> GetSecondaryToolBarExtensibilityManager() override { return SecondaryToolBarExtensibilityManager; }
|
|
|
|
virtual TArray<FStaticMeshEditorToolbarExtender>& GetAllStaticMeshEditorToolbarExtenders() override { return StaticMeshEditorToolbarExtenders; }
|
|
|
|
private:
|
|
TSharedPtr<FExtensibilityManager> MenuExtensibilityManager;
|
|
TSharedPtr<FExtensibilityManager> ToolBarExtensibilityManager;
|
|
TSharedPtr<FExtensibilityManager> SecondaryToolBarExtensibilityManager;
|
|
TArray<FStaticMeshEditorToolbarExtender> StaticMeshEditorToolbarExtenders;
|
|
};
|
|
|
|
IMPLEMENT_MODULE( FStaticMeshEditorModule, StaticMeshEditor );
|