UBspConversionTool

Converts BSP brushes to static meshes.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

MeshModelingToolsEditorOnly

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/MeshModelingToolsEditorOnly/Public/BspConversionTool.h

Include

#include "BspConversionTool.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UBspConversionTool : public UInteractiveTool

Remarks

Converts BSP brushes to static meshes.

Known limitations:

  • Preview does not respond to property changes in the brush detail panel while the tool is running. User would need to create some event that does change the preview (such as tool property change, or selection change).

  • BSP brushes with non-manifold geometry (specifically, the stair brushes) cannot be used with the "Convert, then combine" path because boolean operations do not allow them. The user gets properly notified of this if it comes up.

Variables

Constructors

Name Description

Public function

UBspConversionTool()

Functions

Name Description

Protected function

void

 

ApplyAction

(
    EBspConversionToolAction ActionType
)

Protected function Const

bool

 

AtLeastOneValidConversionTarget()

Returns true if there is at least one valid conversion actor selected (an explicitly selected brush, or a volume if those are included).

Protected function

bool

 

CombineThenConvert

(
    FText* ErrorMessage
)

The easy conversion path, where we just use the existing bsp conversion function to convert everything that was selected.

Protected function

bool

 

CompareAndUpdateConversionTargets()

Updates the targets that the conversion functions operate on (BrushesToConvert, BrushForPivot), based on level composition, current selection, and settings.

Protected function

bool

 

ComputeAndUpdatePreviewMesh

(
    FText* ErrorMessage
)

Performs conversion of BrushesToConvert and stores the result in the preview mesh.

Protected function

bool

 

ConvertThenCombine

(
    FText* ErrorMessage
)

The more complicated conversion path, where we convert brushes individually and use static mesh boolean operations to combine them.

Protected function Const

bool

 

IsValidConversionTarget

(
    const ABrush* Brush
)

Determines whether the passed in pointer is a valid convertible brush.

Protected function

void

 

OnEditorActorMoved

(
    AActor* InActor
)

Actor movements include any transform changes, and change both the preview and the cached brushes.

Protected function

void

 

OnEditorLevelActorListChanged()

Changes to the actor list may change the order of brush composition, or add or remove implicitly included subtractive brushes.

Protected function

void

 

OnEditorSelectionChanged

(
    UObject* NewSelection
)

This is the primary event we'll be responding to.

Public function Virtual

void

 

RequestAction

(
    EBspConversionToolAction ActionType
)

Public function Virtual

void

 

SetAssetAPI

(
    IToolsContextAssetAPI* InAsset...
)

Public function Virtual

void

 

SetWorld

(
    UWorld* World
)

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

 

RegisterActions

(
    FInteractiveToolActionSet& ActionS...
)

Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction.

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup()

Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss