Files
mesh-project-duplicate-remover/Source/OptimizerEditor/Private/SOptimizerPanel.h
Bonchellon a95b299680 Mesh Optimizer: sibling StaticMesh duplicate remover (UE 5.7)
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>
2026-07-01 18:26:45 +03:00

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;
};