You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-166618 #preflight 634587a4e7396f4e6ef4a74b #rb lonnie.li [CL 22530153 by David Hill in ue5-main branch]
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "BaseTools/MultiSelectionMeshEditingTool.h"
|
|
#include "InteractiveToolBuilder.h"
|
|
#include "InteractiveToolQueryInterfaces.h" // IInteractiveToolExclusiveToolAPI
|
|
#include "PropertySets/CreateMeshObjectTypeProperties.h"
|
|
#include "ConvertMeshesTool.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesToolBuilder : public UMultiSelectionMeshEditingToolBuilder
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
virtual UMultiSelectionMeshEditingTool* CreateNewTool(const FToolBuilderState& SceneState) const override;
|
|
|
|
protected:
|
|
virtual const FToolTargetTypeRequirements& GetTargetRequirements() const override;
|
|
};
|
|
|
|
/**
|
|
* Standard properties of the Transfer operation
|
|
*/
|
|
UCLASS()
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesToolProperties : public UInteractiveToolPropertySet
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(EditAnywhere, Category = Options, meta = (EditCondition = "bShowTransferMaterials == true", EditConditionHides, HideEditConditionToggle))
|
|
bool bTransferMaterials = true;
|
|
|
|
// control whether the transfer materials option is displayed
|
|
UPROPERTY(meta = (TransientToolProperty))
|
|
bool bShowTransferMaterials = true;
|
|
};
|
|
|
|
|
|
|
|
UCLASS()
|
|
class MESHMODELINGTOOLSEXP_API UConvertMeshesTool : public UMultiSelectionMeshEditingTool,
|
|
// Disallow auto-accept switch-away for the tool
|
|
public IInteractiveToolExclusiveToolAPI
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void Setup() override;
|
|
virtual void OnShutdown(EToolShutdownType ShutdownType) override;
|
|
|
|
virtual bool HasCancel() const override { return true; }
|
|
virtual bool HasAccept() const override { return true; }
|
|
virtual bool CanAccept() const override;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UConvertMeshesToolProperties> BasicProperties;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UCreateMeshObjectTypeProperties> OutputTypeProperties;
|
|
};
|