2021-06-23 22:14:55 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
2021-11-23 09:42:40 -05:00
|
|
|
#include "BaseTools/MultiSelectionMeshEditingTool.h"
|
2021-06-23 22:14:55 -04:00
|
|
|
#include "InteractiveToolBuilder.h"
|
2022-01-21 14:29:25 -05:00
|
|
|
#include "InteractiveToolQueryInterfaces.h" // IInteractiveToolExclusiveToolAPI
|
2021-06-23 22:14:55 -04:00
|
|
|
#include "PropertySets/CreateMeshObjectTypeProperties.h"
|
|
|
|
|
#include "ConvertMeshesTool.generated.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
UCLASS()
|
2021-11-23 09:42:40 -05:00
|
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesToolBuilder : public UMultiSelectionMeshEditingToolBuilder
|
2021-06-23 22:14:55 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
public:
|
2021-11-23 09:42:40 -05:00
|
|
|
virtual UMultiSelectionMeshEditingTool* CreateNewTool(const FToolBuilderState& SceneState) const override;
|
2021-06-23 22:14:55 -04:00
|
|
|
|
|
|
|
|
protected:
|
2021-11-23 09:42:40 -05:00
|
|
|
virtual const FToolTargetTypeRequirements& GetTargetRequirements() const override;
|
2021-06-23 22:14:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Standard properties of the Transfer operation
|
|
|
|
|
*/
|
|
|
|
|
UCLASS()
|
2021-07-29 20:08:48 -04:00
|
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesToolProperties : public UInteractiveToolPropertySet
|
2021-06-23 22:14:55 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
public:
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = Options)
|
|
|
|
|
bool bTransferMaterials = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UCLASS()
|
2022-01-21 14:29:25 -05:00
|
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesTool : public UMultiSelectionMeshEditingTool,
|
|
|
|
|
// Disallow auto-accept switch-away for the tool
|
|
|
|
|
public IInteractiveToolExclusiveToolAPI
|
2021-06-23 22:14:55 -04:00
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual void Setup() override;
|
2022-01-28 18:40:54 -05:00
|
|
|
virtual void OnShutdown(EToolShutdownType ShutdownType) override;
|
2021-06-23 22:14:55 -04:00
|
|
|
|
|
|
|
|
virtual bool HasCancel() const override { return true; }
|
|
|
|
|
virtual bool HasAccept() const override { return true; }
|
|
|
|
|
virtual bool CanAccept() const override;
|
|
|
|
|
|
|
|
|
|
UPROPERTY()
|
2021-07-20 00:24:38 -04:00
|
|
|
TObjectPtr<UConvertMeshesToolProperties> BasicProperties;
|
2021-06-23 22:14:55 -04:00
|
|
|
|
|
|
|
|
UPROPERTY()
|
2021-07-20 00:24:38 -04:00
|
|
|
TObjectPtr<UCreateMeshObjectTypeProperties> OutputTypeProperties;
|
2021-06-23 22:14:55 -04:00
|
|
|
};
|