Navigation
API > API/Plugins > API/Plugins/UVEditor
The UV editor mode is the mode used in the UV asset editor. It holds most of the inter-tool state. We put things in a mode instead of directly into the asset editor in case we want to someday use the mode in multiple asset editors.
| Name | UUVEditorMode |
| Type | class |
| Header File | /Engine/Plugins/Editor/UVEditor/Source/UVEditor/Public/UVEditorMode.h |
| Include Path | #include "UVEditorMode.h" |
Syntax
UCLASS (Transient)
class UUVEditorMode : public UEdMode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UEdMode → UUVEditorMode
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UUVEditorMode() |
UVEditorMode.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AnalyticsLastStartTimestamp | FDateTime | UVEditorMode.h | |
| EM_UVEditorModeId | const FEditorModeID | UVEditorMode.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BackgroundVisualization | TObjectPtr< UUVEditorBackgroundPreview > | We don't actually override MouseEnter, etc, because things get forwarded to the input router via FEditorModeTools, and we don't have any additional input handling to do at the mode level. | UVEditorMode.h | |
| DistortionVisualization | TObjectPtr< UUVEditorDistortionVisualization > | UVEditorMode.h | ||
| UVEditorGridProperties | TObjectPtr< UUVEditorGridProperties > | Hold a settings object to configure the grid. | UVEditorMode.h | |
| UVEditorUDIMProperties | TObjectPtr< UUVEditorUDIMProperties > | Hold a settings object to configure the UDIMs. | UVEditorMode.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LivePreviewToolkitCommands | TWeakPtr< FUICommandList > | Used to make mode hotkeys be triggered properly from the live preview. | UVEditorMode.h | |
| ToolsThatAllowActions | TArray< FString > | UVEditorMode.h | ||
| UVEditorLivePreviewUXProperties | TObjectPtr< UUVEditorLivePreviewUXProperties > | Hold a settings object to configure the visualization in the live preview (3d) viewport. | UVEditorMode.h | |
| UVEditorUnwrappedUXProperties | TObjectPtr< UUVEditorUnwrappedUXProperties > | Hold a settings object to configure the unwrapped visualization. | UVEditorMode.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyChanges() |
UVEditorMode.h | ||
bool CanApplyChanges() |
UVEditorMode.h | ||
void ChangeInputObjectLayer
(
int32 AssetID, |
Public for use by undo/redo. Otherwise should use RequestUVChannelChange. | UVEditorMode.h | |
virtual void DrawHUD
(
FCanvas* Canvas, |
UVEditorMode.h | ||
void EmitToolIndependentObjectChange
(
UObject* TargetObject, |
TODO: We'll probably eventually want a function like this so we can figure out how big our 3d preview scene is and how we should position the camera intially... | UVEditorMode.h | |
void FocusLivePreviewCameraOnSelection() |
UVEditorMode.h | ||
| UVEditorMode.h | |||
void GetAssetsWithUnappliedChanges
(
TArray< TObjectPtr< UObject > > UnappliedAssetsOut |
UVEditorMode.h | ||
UObject * GetBackgroundSettingsObject() |
UVEditorMode.h | ||
int32 GetDisplayedChannel
(
int32 AssetID |
UVEditorMode.h | ||
UObject * GetDistortionVisualsSettingsObject() |
UVEditorMode.h | ||
UObject * GetGridSettingsObject() |
UVEditorMode.h | ||
UObject * GetLivePreviewUXSettingsObject() |
UVEditorMode.h | ||
int32 GetNumUVChannels
(
int32 AssetID |
UVEditorMode.h | ||
UObject * GetToolDisplaySettingsObject() |
UVEditorMode.h | ||
UObject * GetUDIMSettingsObject() |
UVEditorMode.h | ||
UObject * GetUnwrappedUXSettingsObject() |
UVEditorMode.h | ||
bool HaveUnappliedChanges() |
Asset management. | UVEditorMode.h | |
bool IsActive() |
UVEditorMode.h | ||
virtual bool IsDefaultToolActive() |
This is currently not part of the base class at all... Should it be? | UVEditorMode.h | |
void PopulateUDIMsByAsset
(
int32 AssetId, |
UVEditorMode.h | ||
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
UVEditorMode.h | ||
void RequestUVChannelChange
(
int32 AssetID, |
Request a change of the displayed UV channel/layer. | UVEditorMode.h |
Overridden from UEdMode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ActivateDefaultTool () |
We're changing visibility of this one to public here so that we can call it from the toolkit when clicking accept/cancel buttons. | UVEditorMode.h | |
virtual void Enter() |
UVEditorMode.h | ||
virtual void Exit() |
UVEditorMode.h | ||
virtual void ModeTick
(
float DeltaTime |
UVEditorMode.h | ||
virtual bool ShouldToolStartBeAllowed
(
const FString& ToolIdentifier |
UVEditorMode.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void InitializeModeContexts() |
UVEditorMode.h | ||
void InitializeTargets() |
UVEditorMode.h | ||
void RegisterActions() |
UVEditorMode.h | ||
void RegisterTools() |
UVEditorMode.h | ||
void SetDisplayedUVChannels
(
const TArray< int32 >& LayerPerAsset, |
Used with the ToolAssetAndLayerAPI to process tool layer change requests. | UVEditorMode.h | |
void SetSimulationWarning
(
bool bEnabled |
UVEditorMode.h | ||
void UpdateActiveUDIMs() |
UVEditorMode.h | ||
void UpdatePreviewMaterialBasedOnBackground() |
UVEditorMode.h | ||
void UpdateTriangleMaterialBasedOnBackground
(
bool IsBackgroundVisible |
UVEditorMode.h | ||
void UpdateTriangleMaterialBasedOnDisplaySettings() |
UVEditorMode.h |
Overridden from UEdMode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BindCommands() |
Not sure whether we need these yet. | UVEditorMode.h | |
virtual void CreateToolkit() |
UVEditorMode.h | ||
virtual void OnToolEnded
(
UInteractiveToolManager* Manager, |
UVEditorMode.h | ||
virtual void OnToolStarted
(
UInteractiveToolManager* Manager, |
UVEditorMode.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FToolTargetTypeRequirements & GetToolTargetRequirements () |
Gets the tool target requirements for the mode. | UVEditorMode.h | |
static double GetUVMeshScalingFactor() |
Gets the factor by which UV layer unwraps get scaled (scaling makes certain things easier, like zooming in, etc). | UVEditorMode.h | |
static void InitializeAssetEditorContexts
(
UContextObjectStore& ContextStore, |
Called by an asset editor so that a created instance of the mode has all the data it needs on Enter() to initialize itself. | UVEditorMode.h |