You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Add UE::ToolTarget::SupportsIncrementalMeshChanges() and ::ApplyIncrementalMeshEditChange(), these allow a Tool to directly edit a DynamicMeshComponent in the level (and emit corresponding MeshChange) so that a Tool can emit multiple undoable edits on a DynamicMesh Add new USingleTargetWithSelectionTool base tool class, this is a USingleSelectionTool that can receive a FGeometrySelection. USingleTargetWithSelectionToolBuilder configures this type of Tool as necessary. Add new LinearExtrusionOp dynamic mesh operator, provides linear-extrusion API to FOffsetMeshRegion using new Operator design (mesh shared via FSharedConstDynamicMesh3, CalculateResultInPlace() function to simplify direct usage in geometry script/etc) Add new ExtrudeMeshSelectionTool, subclass of USingleTargetWithSelectionTool, exposes new LinearExtrusionOp, uses above ToolTarget functions to directly edit DynamicMeshComponent where possible Enable new Tool in Modeling Mode Add a few new functions to UMeshOpPreviewWithBackgroundCompute to simplify configuring InProgress and Secondary materials Small additions to USingleSelectionTool #preflight 639a3e250a671525500d8a7e #rb none [CL 23520421 by ryan schmidt in ue5-main branch]
62 lines
1.2 KiB
C++
62 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "InteractiveTool.h"
|
|
#include "ComponentSourceInterfaces.h"
|
|
#include "ToolTargets/ToolTarget.h"
|
|
#include "InteractiveToolQueryInterfaces.h"
|
|
|
|
#include "SingleSelectionTool.generated.h"
|
|
|
|
UCLASS(Transient)
|
|
class INTERACTIVETOOLSFRAMEWORK_API USingleSelectionTool : public UInteractiveTool, public IInteractiveToolCameraFocusAPI
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
/**
|
|
* Set the ToolTarget for the Tool
|
|
*/
|
|
virtual void SetTarget(UToolTarget* TargetIn)
|
|
{
|
|
Target = TargetIn;
|
|
}
|
|
|
|
/**
|
|
* @return the ToolTarget for the Tool
|
|
*/
|
|
virtual UToolTarget* GetTarget()
|
|
{
|
|
return Target;
|
|
}
|
|
|
|
/**
|
|
* @return true if all ToolTargets of this tool are still valid
|
|
*/
|
|
virtual bool AreAllTargetsValid() const
|
|
{
|
|
return Target ? Target->IsValid() : false;
|
|
}
|
|
|
|
|
|
public:
|
|
virtual bool CanAccept() const override
|
|
{
|
|
return AreAllTargetsValid();
|
|
}
|
|
|
|
protected:
|
|
UPROPERTY()
|
|
TObjectPtr<UToolTarget> Target;
|
|
|
|
|
|
|
|
public:
|
|
// IInteractiveToolCameraFocusAPI implementation
|
|
virtual bool SupportsWorldSpaceFocusBox() override;
|
|
virtual FBox GetWorldSpaceFocusBox() override;
|
|
virtual bool SupportsWorldSpaceFocusPoint() override;
|
|
virtual bool GetWorldSpaceFocusPoint(const FRay& WorldRay, FVector& PointOut) override;
|
|
|
|
};
|