Files
UnrealEngineUWP/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/BaseTools/BaseVoxelTool.h
jimmy andrews 5337719d2e Fix vox offset tool issues:
- Warn about artifacts on meshes with open boundaries
 - Fix some settings not being saved/restored
 - Fix transaction name on undo/redo not matching the tool name

Also: Make the asset warning for base interactive tool only clear the tool's display message if it set a display message when it was last called, so that it is less likely to clear unrelated display messages when called with no warning to display.

#jira UE-180838
#jira UE-180758
#jira UE-180838
#rb rinat.abdrashitov
#preflight 641be32f25389270b7300ae4

[CL 24783364 by jimmy andrews in ue5-main branch]
2023-03-24 14:05:46 -04:00

45 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "BaseTools/BaseCreateFromSelectedTool.h"
#include "PropertySets/VoxelProperties.h"
#include "BaseVoxelTool.generated.h"
PREDECLARE_USE_GEOMETRY_CLASS(FDynamicMesh3);
/**
* Base for Voxel tools
*/
UCLASS()
class MODELINGCOMPONENTS_API UBaseVoxelTool : public UBaseCreateFromSelectedTool
{
GENERATED_BODY()
protected:
/** Sets up VoxProperties; typically need to overload and call "Super::SetupProperties();" */
virtual void SetupProperties() override;
/** Saves VoxProperties; typically need to overload and call "Super::SaveProperties();" */
virtual void SaveProperties() override;
/** Sets up the default preview and converted inputs for voxel tools; Typically do not need to overload */
virtual void ConvertInputsAndSetPreviewMaterials(bool bSetPreviewMesh = true) override;
/** Sets the output material to the default "world grid" material */
virtual TArray<UMaterialInterface*> GetOutputMaterials() const override;
// Test whether any of the OriginalDynamicMeshes has any open boundary edges
virtual bool HasOpenBoundariesInMeshInputs();
UPROPERTY()
TObjectPtr<UVoxelProperties> VoxProperties;
TArray<TSharedPtr<FDynamicMesh3, ESPMode::ThreadSafe>> OriginalDynamicMeshes;
};