UBaseCreateFromSelectedTool

[UBaseCreateFromSelectedTool](API\Plugins\ModelingComponents\BaseTools\UBaseCreateFromSelectedTool) is a base Tool (must be subclassed) that provides support for common functionality in tools that create a new mesh from a selection of one or more existing meshes

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/BaseTools/BaseCreateFromSelectedTool.h

Include

#include "BaseTools/BaseCreateFromSelectedTool.h"

Syntax

UCLASS()
class UBaseCreateFromSelectedTool :
    public UMultiSelectionMeshEditingTool,
    public UE::Geometry::IDynamicMeshOperatorFactory

Remarks

UBaseCreateFromSelectedTool is a base Tool (must be subclassed) that provides support for common functionality in tools that create a new mesh from a selection of one or more existing meshes

Variables

Constructors

Functions

Name Description

Protected function Virtual

void

 

ConvertInputsAndSetPreviewMaterials

(
    bool bSetPreviewMesh
)

UBaseCreateFromSelectedTool API - subclasses typically implement these functions After preview is created, this is called to convert inputs and set preview materials (grouped together because materials may come from inputs) Subclasses should always implement this.

Protected function Virtual

void

 

GenerateAsset

(
    const FDynamicMeshOpResult& Result
)

Helper to generate assets when a result is accepted; typically does not need to be overloaded.

Protected function Virtual Const

FText

 

GetActionName()

Return the name of the action to be used in the Undo stack

Protected function Virtual Const

FString

 

GetCreatedAssetName()

Return the name to be used for generated assets.

Protected function Virtual Const

int32

 

GetHiddenGizmoIndex()

Which of the transform gizmos to hide, or -1 if all gizmos can be shown.

Protected function Virtual Const

TArray< UMat...

 

GetOutputMaterials()

Return the materials to be used on the output mesh on tool accept; defaults to the materials set on the preview

Protected function Const

FString

 

PrefixWithSourceNameIfSingleSelection

(
    const FString& AssetName
)

Helper to build asset names

Protected function Virtual

void

 

SaveProperties()

Overload to save any added properties in the subclasses; called on shutdown

Protected function Virtual

void

 

SetPreviewCallbacks()

Optional overload to set callbacks on preview, e.g. to visualize results; called after preview is created.

Protected function Virtual

void

 

SetTransformGizmos()

Protected function Virtual

void

 

SetupProperties()

Overload to initialize any added properties in subclasses; called during setup

Protected function Virtual

void

 

TransformChanged

(
    UTransformProxy* Proxy,
    FTransform Transform
)

Protected function Virtual

void

 

UpdateAsset

(
    const FDynamicMeshOpResult& Result,
    UToolTarget* Target
)

Helper to generate assets when a result is accepted; typically does not need to be overloaded.

Protected function Virtual

void

 

UpdateGizmoVisibility()

Helpers for managing transform gizoms; typically do not need to be overloaded.

Overridden from UInteractiveTool

Name Description

Public function Virtual Const

bool

 

CanAccept()

Public function Virtual Const

bool

 

HasAccept()

Public function Virtual Const

bool

 

HasCancel()

Public function Virtual

void

 

OnPropertyModified

(
    UObject* PropertySet,
    FProperty* Property
)

Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes

Public function Virtual

void

 

OnTick

(
    float DeltaTime
)

Action support/system

Public function Virtual

void

 

Setup()

InteractiveTool API - generally does not need to be modified by subclasses

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Overridden from IDynamicMeshOperatorFactory

Name Description

Protected function Virtual

TUniquePtr< ...

 

MakeNewOperator()

IDynamicMeshOperatorFactory implementation that subclass must override and implement

Typedefs

Name

Description

FFrame3d

FTransform3d