Files
UnrealEngineUWP/Engine/Source/Editor/MeshPaint/Private/MeshPaintModule.cpp
Michael Noland 345b90f305 Editor: Make IMeshPaintGeometryAdapter::LineTraceComponent const
[CL 2393441 by Michael Noland in Main branch]
2014-12-19 00:12:28 -05:00

49 lines
1.4 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "MeshPaintPrivatePCH.h"
#include "MeshPaintEdMode.h"
#include "MeshPaintAdapterFactory.h"
#include "MeshPaintStaticMeshAdapter.h"
class FMeshPaintModule : public IMeshPaintModule
{
public:
/**
* Called right after the module's DLL has been loaded and the module object has been created
*/
virtual void StartupModule() override
{
FEditorModeRegistry::Get().RegisterMode<FEdModeMeshPaint>(
FBuiltinEditorModes::EM_MeshPaint,
NSLOCTEXT("MeshPaint_Mode", "MeshPaint_ModeName", "Paint"),
FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.MeshPaintMode", "LevelEditor.MeshPaintMode.Small"),
true, 200
);
RegisterGeometryAdapterFactory(MakeShareable(new FMeshPaintGeometryAdapterForStaticMeshesFactory));
}
/**
* Called before the module is unloaded, right before the module object is destroyed.
*/
virtual void ShutdownModule() override
{
FEditorModeRegistry::Get().UnregisterMode(FBuiltinEditorModes::EM_MeshPaint);
}
virtual void RegisterGeometryAdapterFactory(TSharedRef<IMeshPaintGeometryAdapterFactory> Factory) override
{
FMeshPaintAdapterFactory::FactoryList.Add(Factory);
}
virtual void UnregisterGeometryAdapterFactory(TSharedRef<IMeshPaintGeometryAdapterFactory> Factory) override
{
FMeshPaintAdapterFactory::FactoryList.Remove(Factory);
}
};
IMPLEMENT_MODULE( FMeshPaintModule, MeshPaint );