Editor plugin that detects geometrically-identical sibling StaticMeshes across a level, rebases each placement onto one canonical mesh with a corrected transform (W' = D * W, verified by exact vertex matching), and can collapse groups into HISM. Native Slate tool panel + BlueprintCallable UOptimizerSubsystem. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
861 B
C++
27 lines
861 B
C++
// Copyright IHY.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Modules/ModuleInterface.h"
|
|
|
|
/**
|
|
* Editor-only module for the Mesh Optimizer.
|
|
*
|
|
* Registers a Tools-menu entry + nomad tab hosting the native Slate panel (SOptimizerPanel),
|
|
* which drives UOptimizerSubsystem: scan level StaticMesh usage, group geometrically-identical
|
|
* "sibling" meshes, rebase every user onto one canonical mesh with a pivot/rotation-corrected
|
|
* transform, and optionally collapse the group into a HierarchicalInstancedStaticMesh.
|
|
*/
|
|
class FOptimizerEditorModule : public IModuleInterface
|
|
{
|
|
public:
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
private:
|
|
void RegisterMenus(); // deferred via UToolMenus startup callback
|
|
TSharedRef<class SDockTab> SpawnPanelTab(const class FSpawnTabArgs& Args);
|
|
|
|
bool bTabRegistered = false;
|
|
};
|