void FMergeActorsModule::StartupModule()
{
	FGlobalTabmanager::Get()->RegisterNomadTabSpawner(MergeActorsTabName, FOnSpawnTab::CreateRaw(this, &FMergeActorsModule::CreateMergeActorsTab))
		.SetDisplayName(NSLOCTEXT("MergeActorsModule", "TabTitle", "Merge Actors"))
		.SetTooltipText(NSLOCTEXT("MergeActorsModule", "TooltipText", "Open the Merge Actors tab."))
		.SetGroup(WorkspaceMenu::GetMenuStructure().GetDeveloperToolsMiscCategory())
		.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "MergeActors.TabIcon"));

	// Register built-in merging tools straight away
	ensure(RegisterMergeActorsTool(MakeUnique<FMeshMergingTool>()));

	IMeshUtilities* MeshUtilities = FModuleManager::Get().LoadModulePtr<IMeshUtilities>("MeshUtilities");
	if (MeshUtilities != nullptr && MeshUtilities->GetMeshMergingInterface() != nullptr)
	{
		// Only register MeshProxyTool if Simplygon is available
		ensure(RegisterMergeActorsTool(MakeUnique<FMeshProxyTool>()));
	}
}
Beispiel #2
0
void FMergeActorsModule::StartupModule()
{
	bRegisteredTabSpawner = false;

	// This is still experimental in the editor, so it's invoked specifically in FMainMenu for now.
	// When no longer experimental, switch to the nomad spawner registration below
	FGlobalTabmanager::Get()->RegisterTabSpawner(MergeActorsApp, FOnSpawnTab::CreateRaw(this, &FMergeActorsModule::CreateMergeActorsTab))
		.SetDisplayName(LOCTEXT("TabTitle", "Merge Actors"))
		.SetTooltipText(LOCTEXT("TooltipText", "Open the Merge Actors tab."))
		.SetGroup(WorkspaceMenu::GetMenuStructure().GetLevelEditorCategory())
		.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "ClassViewer.TabIcon"));

	bRegisteredTabSpawner = true;

	// Register built-in merging tools straight away
	ensure(RegisterMergeActorsTool(MakeUnique<FMeshMergingTool>()));

	IMeshUtilities* MeshUtilities = FModuleManager::Get().LoadModulePtr<IMeshUtilities>("MeshUtilities");
	if (MeshUtilities != nullptr && MeshUtilities->GetMeshMergingInterface() != nullptr)
	{
		// Only register MeshProxyTool if Simplygon is available
		ensure(RegisterMergeActorsTool(MakeUnique<FMeshProxyTool>()));
	}
}