You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Breaking changes include:
* Rename of GEditorModeTools -> GLevelEditorModeTools to signify that it applies only to the level editor modes
* Addition of FEditorModeRegistry, responsible for managing and creating new editor modes. Modes are no longer registered with an instance of the mode, instead with a mode factory that is able to create a new mode of that type.
* Editor modes now operate on FEditorViewportClients rather than FLevelEditorViewportClients
* Added ability to specify an FEditorModeTools when creating an FEditorViewport
Moved component vizualiser manager handling outside of individual editor modes, and into FLevelEditorViewportClient. This should make it easier to transplant in future.
This work addresses TTP#334640 - EDITOR: Investigate making editor modes a per-'editor' concept
Reviewed by Michael Noland, Matt Kuhlenschmidt
[CL 2109245 by Andrew Rodham in Main branch]
58 lines
1.9 KiB
C++
58 lines
1.9 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
/**
|
|
* Allows the user to place verts in an orthographic viewport and create a brush afterwards.
|
|
*/
|
|
|
|
#pragma once
|
|
#include "GeomModifier_Pen.generated.h"
|
|
|
|
UCLASS()
|
|
class UGeomModifier_Pen : public UGeomModifier_Edit
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
/** If true, the shape will be automatically extruded into a brush upon completion. */
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
uint32 bAutoExtrude:1;
|
|
|
|
/** If true, the tool will try and optimize the resulting triangles into convex polygons before creating the brush. */
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
uint32 bCreateConvexPolygons:1;
|
|
|
|
/** If true, the resulting shape will be turned into an ABrushShape actor. */
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
uint32 bCreateBrushShape:1;
|
|
|
|
/** How far to extrude the newly created brush if bAutoExtrude is set to true. */
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
int32 ExtrudeDepth;
|
|
|
|
/** The vertices that the user has dropped down in the world so far. */
|
|
UPROPERTY()
|
|
TArray<FVector> ShapeVertices;
|
|
|
|
/** The mouse position, in world space, where the user currently is hovering (snapped to grid if that setting is enabled). */
|
|
UPROPERTY(transient)
|
|
FVector MouseWorldSpacePos;
|
|
|
|
|
|
FEditorViewportClient* UsingViewportClient;
|
|
|
|
// Begin UGeomModifier Interface
|
|
virtual bool InputKey(class FEditorViewportClient* ViewportClient, FViewport* Viewport, FKey Key, EInputEvent Event) override;
|
|
virtual void Render(const FSceneView* View,FViewport* Viewport,FPrimitiveDrawInterface* PDI) override;
|
|
virtual void DrawHUD(FEditorViewportClient* ViewportClient,FViewport* Viewport,const FSceneView* View,FCanvas* Canvas) override;
|
|
virtual void Tick(FEditorViewportClient* ViewportClient,float DeltaTime) override;
|
|
virtual void WasActivated() override;
|
|
protected:
|
|
virtual bool OnApply() override;
|
|
// End UGeomModifier Interface
|
|
private:
|
|
void Apply();
|
|
};
|
|
|
|
|
|
|