Navigation
API > API/Plugins > API/Plugins/UVEditor
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UEdMode
- UUVEditorMode
References
| Module | UVEditor |
| Header | /Engine/Plugins/Editor/UVEditor/Source/UVEditor/Public/UVEditorMode.h |
| Include | #include "UVEditorMode.h" |
Syntax
UCLASS&40;Transient&41;
class UUVEditorMode : public UEdMode
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TSharedPtr< UE::Geometry::FDynamicMesh3 > > | AppliedCanonicalMeshes | 1:1 with the asset arrays. | |
| TArray< TObjectPtr< UMeshOpPreviewWithBackgroundCompute > > | AppliedPreviews | 1:1 with AppliedCanonicalMeshes, the actual displayed 3d meshes that can be used by tools for background computations. | |
| TArray< FString > | AssetNames | 1:1 with ToolTargets, indexed by AssetID | |
| TObjectPtr< UUVEditorBackgroundPreview > | BackgroundVisualization | 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. | |
| FDelegateHandle | BeginPIEDelegateHandle | ||
| bool | bIsActive | ||
| bool | bPIEModeActive | Holds references to PIE callbacks to handle logic when the PIE session starts & shuts down. | |
| FDelegateHandle | CancelPIEDelegateHandle | ||
| TArray< TWeakObjectPtr< UUVToolContextObject > > | ContextsToShutdown | ||
| TArray< TWeakObjectPtr< UUVToolContextObject > > | ContextsToUpdateOnToolEnd | ||
| FString | DefaultToolIdentifier | ||
| TObjectPtr< UUVEditorDistortionVisualization > | DistortionVisualization | ||
| FDelegateHandle | EndPIEDelegateHandle | ||
| TWeakObjectPtr< UEditorInteractiveToolsContext > | LivePreviewITC | Used to forward Render/DrawHUD calls in the live preview to the api object. | |
| TObjectPtr< UWorld > | LivePreviewWorld | Here largely for convenience to avoid having to pass it around functions. | |
| TSet< int32 > | ModifiedAssetIDs | Authoritative list of targets that have changes that have not been baked back yet. | |
| TArray< TObjectPtr< UObject > > | OriginalObjectsToEdit | Stores original input objects, for instance UStaticMesh pointers. | |
| TArray< int32 > | PendingUVLayerIndex | ||
| FDelegateHandle | PostSaveWorldDelegateHandle | Holds references to Save callbacks to handle logic when the autosave triggers and shuts down active tools. | |
| TArray< TObjectPtr< UInteractiveToolPropertySet > > | PropertyObjectsToTick | Mode-level property objects (visible or not) that get ticked. | |
| TArray< TObjectPtr< UUVToolAction > > | RegisteredActions | ||
| TObjectPtr< UUVToolSelectionAPI > | SelectionAPI | ||
| TArray< TObjectPtr< UUVEditorToolMeshInput > > | ToolInputObjects | Input objects we give to the tools, one per displayed UV layer. | |
| TArray< TObjectPtr< UToolTarget > > | ToolTargets | Tool targets created from OriginalObjectsToEdit (and 1:1 with that array) that provide us with dynamic meshes whose UV layers we unwrap. | |
| TArray< FTransform > | Transforms | Transforms that should be used for the 3d previews, 1:1 with OriginalObjectsToEdit and ToolTargets. | |
| int32 | UDIMsChangedWatcherId | ||
| TObjectPtr< UUVEditorGridProperties > | UVEditorGridProperties | Hold a settings object to configure the grid. | |
| TObjectPtr< UUVEditorUDIMProperties > | UVEditorUDIMProperties | Hold a settings object to configure the UDIMs. | |
| TArray< TWeakObjectPtr< UMeshElementsVisualizer > > | WireframesToTick | Wireframes have to get ticked to be able to respond to setting changes. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyChanges () |
||
| bool | |||
| void | ChangeInputObjectLayer
(
int32 AssetID, |
Public for use by undo/redo. Otherwise should use RequestUVChannelChange. | |
| void | DrawHUD
(
FCanvas* Canvas, |
||
| 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... | |
| void | |||
| const TArray< FString > & | |||
| void | GetAssetsWithUnappliedChanges
(
TArray< TObjectPtr< UObject >> UnappliedAssetsOut |
||
| UObject * | |||
| int32 | GetDisplayedChannel
(
int32 AssetID |
||
| UObject * | |||
| UObject * | |||
| int32 | GetNumUVChannels
(
int32 AssetID |
||
| UObject * | |||
| const FToolTargetTypeRequirements & | Gets the tool target requirements for the mode. | ||
| UObject * | |||
| double | Gets the factor by which UV layer unwraps get scaled (scaling makes certain things easier, like zooming in, etc). | ||
| bool | Asset management. | ||
| 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. | |
| void | |||
| void | |||
| bool | IsActive () |
||
| bool | This is currently not part of the base class at all... Should it be? | ||
| void | PopulateUDIMsByAsset
(
int32 AssetId, |
||
| void | |||
| void | |||
| void | Render
(
IToolsContextRenderAPI* RenderAPI |
||
| void | RequestUVChannelChange
(
int32 AssetID, |
Request a change of the displayed UV channel/layer. | |
| void | SetDisplayedUVChannels
(
const TArray< int32 >& LayerPerAsset, |
Used with the ToolAssetAndLayerAPI to process tool layer change requests. | |
| void | SetSimulationWarning
(
bool bEnabled |
||
| void | |||
| void | |||
| void |
Overridden from UEdMode
| Type | Name | Description | |
|---|---|---|---|
| void | We're changing visibility of this one to public here so that we can call it from the toolkit when clicking accept/cancel buttons. | ||
| void | BindCommands () |
Not sure whether we need these yet. | |
| void | |||
| void | Enter () |
||
| void | Exit () |
||
| void | ModeTick
(
float DeltaTime |
||
| void | OnToolEnded
(
UInteractiveToolManager* Manager, |
||
| void | OnToolStarted
(
UInteractiveToolManager* Manager, |
||
| bool | ShouldToolStartBeAllowed
(
const FString& ToolIdentifier |
Subclasses can override this to add additional checks on whether a tool should be allowed to start. |
Constants
| Name | Description |
|---|---|
| AnalyticsLastStartTimestamp | |
| EM_UVEditorModeId |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | UpdateTriangleMaterialBasedOnBackground
(
bool IsBackgroundVisible |
UpdateTriangleMaterialBasedOnBackground is deprecated, replaced by the more generic UpdateTriangleMaterialBasedOnDisplaySettings. |