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>
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright IHY.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
class STextBlock;
|
|
class SCheckBox;
|
|
class SWidget;
|
|
|
|
/**
|
|
* Native Slate panel for the Mesh Optimizer (hosted in a nomad tab). Drives UOptimizerSubsystem:
|
|
* Scan (dry-run report) / Unify (reassign siblings) / Build HISM (collapse). Uses editor styling
|
|
* so it reads as a native tool rather than raw UMG.
|
|
*/
|
|
class SOptimizerPanel : public SCompoundWidget
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS(SOptimizerPanel) {}
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments& InArgs);
|
|
|
|
private:
|
|
TSharedRef<SWidget> MakeLabeledCheck(TSharedPtr<SCheckBox>& Out, const FText& Label, bool bDefault);
|
|
TSharedRef<SWidget> MakeButton(const FText& Label, FOnClicked OnClicked);
|
|
|
|
FReply OnScan();
|
|
FReply OnUnify();
|
|
FReply OnBuildHISM();
|
|
|
|
void SetReport(const FString& Text);
|
|
bool IsChecked(const TSharedPtr<SCheckBox>& Chk) const;
|
|
|
|
TSharedPtr<SCheckBox> ChkMirror;
|
|
TSharedPtr<SCheckBox> ChkScale;
|
|
TSharedPtr<SCheckBox> ChkMergeMat;
|
|
TSharedPtr<SCheckBox> ChkDestroy;
|
|
TSharedPtr<STextBlock> ResultsBox;
|
|
};
|