You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Removed type-specific base classes for mesh editor commands - We now have a different base class for 'instant' commands vs 'edit' commands instead - Removed 'F1' shortcut for move mode. Will be dealing with that soon. #rb none [CL 3428090 by Mike Fricker in Dev-Geometry branch]
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "MeshEditorCommands.h"
|
|
#include "SplitEdge.generated.h"
|
|
|
|
|
|
/** Inserts a vertex along an edge and allows the user to move it around */
|
|
UCLASS()
|
|
class USplitEdgeCommand : public UMeshEditorEditCommand
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
protected:
|
|
|
|
USplitEdgeCommand()
|
|
: SplitEdgeMeshesAndEdgesToSplit(),
|
|
SplitEdgeSplitList()
|
|
{
|
|
UndoText = NSLOCTEXT( "MeshEditor", "UndoSplitEdge", "Split Edge" );
|
|
bNeedsHoverLocation = false;
|
|
bNeedsDraggingInitiated = true;
|
|
}
|
|
|
|
// Overrides
|
|
virtual EEditableMeshElementType GetElementType() const override
|
|
{
|
|
return EEditableMeshElementType::Edge;
|
|
}
|
|
virtual void RegisterUICommand( class FBindingContext* BindingContext ) override;
|
|
virtual bool TryStartingToDrag( IMeshEditorModeEditingContract& MeshEditorMode, class UViewportInteractor* ViewportInteractor ) override;
|
|
virtual void ApplyDuringDrag( IMeshEditorModeEditingContract& MeshEditorMode, class UViewportInteractor* ViewportInteractor ) override;
|
|
|
|
protected:
|
|
|
|
/** When splitting an edge and dragging a vertex, this is the list of edges that will be split */
|
|
TMap< class UEditableMesh*, TArray< FMeshElement > > SplitEdgeMeshesAndEdgesToSplit;
|
|
|
|
/** When splitting an edge and dragging a vertex, this is the list of split positions along those edges */
|
|
TArray<float> SplitEdgeSplitList;
|
|
|
|
};
|