Navigation
API > API/Plugins > API/Plugins/UVEditorTools
A package of the needed information for an asset being operated on by a UV editor tool. It includes a UV unwrap mesh, a mesh with the UV layer applied, and background-op-compatible previews for each. It also has convenience methods for updating all of the represenations from just one of them, using a "fast update" code path when possible.
This tool target is a bit different from usual in that it is not created by a tool target manager, and therefore doesn't have an accompanying factory. Instead, it is created by the mode, because the mode has access to the worlds in which the previews need to be created.
It's arguable whether this should even inherit from UToolTarget.
| Name | UUVEditorToolMeshInput |
| Type | class |
| Header File | /Engine/Plugins/Editor/UVEditor/Source/UVEditorTools/Public/ToolTargets/UVEditorToolMeshInput.h |
| Include Path | #include "ToolTargets/UVEditorToolMeshInput.h" |
Syntax
UCLASS (MinimalAPI)
class UUVEditorToolMeshInput : public UToolTarget
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UToolTarget → UUVEditorToolMeshInput
Structs
| Name | Remarks |
|---|---|
| FCanonicalModifiedInfo | Information about an OnCanonicalModified broadcast. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnObjectModified | TMulticastDelegate_TwoParams< void, UUVEditorToolMeshInput *InputObject, const FCanonicalModifiedInfo & > | Broadcast when the canonical unwrap or applied meshes change. | ToolTargets/UVEditorToolMeshInput.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| NONE_CHANGED_ARG | const TArray< int32 > *const | Notes above the below convenience functions: | ToolTargets/UVEditorToolMeshInput.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AppliedCanonical | TSharedPtr< UE::Geometry::FDynamicMesh3 > | Note that both UnwrapCanonical and UnwrapPreview, besides having vert positions that represent a UV layer, also have a primary UV overlay that represents the same layer, to make it possible to someday texture the unwrap. | ToolTargets/UVEditorToolMeshInput.h | |
| AppliedPreview | TObjectPtr< UMeshOpPreviewWithBackgroundCompute > | 3d preview of the asset with the UV layer updated, suitable for use with background ops. | ToolTargets/UVEditorToolMeshInput.h | |
| AssetID | int32 | ToolTargets/UVEditorToolMeshInput.h | ||
| bEnableTriangleVertexColors | bool | When enabled, this causes the unwrap preview to recieve updates to the vertex color buffers when mesh updates occur. | ToolTargets/UVEditorToolMeshInput.h | |
| OnCanonicalModified | FOnObjectModified | ToolTargets/UVEditorToolMeshInput.h | ||
| SourceTarget | TObjectPtr< UToolTarget > | Additional needed information. | ToolTargets/UVEditorToolMeshInput.h | |
| UnwrapCanonical | TSharedPtr< UE::Geometry::FDynamicMesh3 > | Mesh representing the unwrapped UV layer. | ToolTargets/UVEditorToolMeshInput.h | |
| UnwrapPreview | TObjectPtr< UMeshOpPreviewWithBackgroundCompute > | Preview of the unwrapped UV layer, suitable for being manipulated by background ops. | ToolTargets/UVEditorToolMeshInput.h | |
| UVLayerIndex | int32 | ToolTargets/UVEditorToolMeshInput.h | ||
| UVToVertPosition | TFunction< FVector3d(const FVector2f &)> | Mappings used for generating and baking back the unwrap. | ToolTargets/UVEditorToolMeshInput.h | |
| VertPositionToUV | TFunction< FVector2f(const FVector3d &)> | ToolTargets/UVEditorToolMeshInput.h | ||
| WireframeDisplay | TObjectPtr< UMeshElementsVisualizer > | Optional: a wireframe to track the mesh in unwrap preview. | ToolTargets/UVEditorToolMeshInput.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppliedVidToUnwrapVids
(
int32 AppliedVid, |
Get the unwrap vids corresponding to a given applied vid. | ToolTargets/UVEditorToolMeshInput.h | |
virtual bool AreMeshesValid () |
Returns whether or not the canonical and preview meshes are still valid. | ToolTargets/UVEditorToolMeshInput.h | |
bool InitializeMeshes
(
UToolTarget* Target, |
ToolTargets/UVEditorToolMeshInput.h | ||
virtual bool IsToolTargetValid () |
Returns whether or not the underlying source ToolTarget is still valid. | ToolTargets/UVEditorToolMeshInput.h | |
void Shutdown() |
ToolTargets/UVEditorToolMeshInput.h | ||
int32 UnwrapVidToAppliedVid
(
int32 UnwrapVid |
Convert a vid in the unwrap mesh to the corresponding vid in the applied mesh (i.e., parent vertex of the element corresponding to the unwrap vertex). | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateAllFromAppliedCanonical
(
const TArray< int32 >* ChangedVids, |
Updates the other meshes using the mesh in AppliedCanonical. | ToolTargets/UVEditorToolMeshInput.h | |
| Updates the other meshes using the UV overlay in the live preview. | ToolTargets/UVEditorToolMeshInput.h | ||
void UpdateAllFromUnwrapCanonical
(
const TArray< int32 >* ChangedVids, |
Updates the other meshes using the mesh in UnwrapCanonical. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateAllFromUnwrapPreview
(
const TArray< int32 >* ChangedVids, |
Updates the other meshes using the mesh in UnwrapPreview. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateAppliedPreviewFromUnwrapPreview
(
const TArray< int32 >* ChangedVids, |
Updates the AppliedPreview from UnwrapPreview, without updating the non-preview meshes. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateCanonicalFromPreviews
(
const TArray< int32 >* ChangedVids, |
Updates the non-preview meshes from their preview counterparts. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateFromCanonicalUnwrapUsingMeshChange
(
const UE::Geometry::FDynamicMeshChange& UnwrapCanonicalMeshChange, |
Uses the stored triangles/vertices in the mesh change to update everything from the canonical unwrap. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdatePreviewsFromCanonical
(
const TArray< int32 >* ChangedVids, |
Updates the preview meshes from their canonical counterparts. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateUnwrapCanonicalOverlayFromPositions
(
const TArray< int32 >* ChangedVids, |
Updates UnwrapCanonical UV Overlay from UnwrapCanonical vert positions. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateUnwrapPreviewFromAppliedPreview
(
const TArray< int32 >* ChangedElementIDs, |
Updates only the UnwrapPreview from AppliedPreview, without updating the non-preview meshes. | ToolTargets/UVEditorToolMeshInput.h | |
void UpdateUnwrapPreviewOverlayFromPositions
(
const TArray< int32 >* ChangedVids, |
Updates UnwrapPreview UV Overlay from UnwrapPreview vert positions. | ToolTargets/UVEditorToolMeshInput.h |
Overridden from UToolTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsValid() |
UToolTarget. | ToolTargets/UVEditorToolMeshInput.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EMeshRenderAttributeFlags GetAppliedUpdateAttributeFlags() |
Returns the currently configured mesh attribute buffer flags enabled on this target for updating the applied previews | ToolTargets/UVEditorToolMeshInput.h | |
virtual EMeshRenderAttributeFlags GetUnwrapUpdateAttributeFlags() |
Returns the currently configured mesh attribute buffer flags enabled on this target for updating the unwrap previews | ToolTargets/UVEditorToolMeshInput.h |