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>
This commit is contained in:
40
Source/OptimizerEditor/Private/SOptimizerPanel.h
Normal file
40
Source/OptimizerEditor/Private/SOptimizerPanel.h
Normal file
@ -0,0 +1,40 @@
|
||||
// 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;
|
||||
};
|
||||
Reference in New Issue
Block a user