Navigation
API > API/Plugins > API/Plugins/ModelingComponentsEditorOnly
A tool target backed by a static mesh asset that can provide and take a mesh description, without 'committer' interfaces for writing to the source static mesh asset.
This is a special tool target that refers to the underlying asset (in this case a static mesh), rather than indirectly through a component. This type of target is used in cases, such as opening an asset through the content browser, when there is no component available.
| Name | UStaticMeshReadOnlyToolTarget |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponentsEditorOnly/Public/ToolTargets/StaticMeshToolTarget.h |
| Include Path | #include "ToolTargets/StaticMeshToolTarget.h" |
Syntax
UCLASS (Transient)
class UStaticMeshReadOnlyToolTarget :
public UToolTarget ,
public IMeshDescriptionProvider ,
public IMaterialProvider ,
public IStaticMeshBackedTarget ,
public IDynamicMeshProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UToolTarget → UStaticMeshReadOnlyToolTarget
Implements Interfaces
- IStaticMeshBackedTarget
- IAssetBackedTarget
- IDynamicMeshProvider
- IMaterialProvider
- IMeshDescriptionProvider
Derived Classes
Structs
| Name | Remarks |
|---|---|
| FCachedMeshDescription | Helper struct to cache mesh descriptions, so we can provide the const ptr GetMeshDescription API while still handling the Build Scale |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FMeshDescriptionCache | TMap< int32, FCachedMeshDescription > | ToolTargets/StaticMeshToolTarget.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedMeshDescriptions | FMeshDescriptionCache | In some cases we need to modify the mesh description that we pass to tools, e.g. to account for the BuildScale, and in those cases we retain the storage here to cover the lifetime of the pointer returned by GetMeshDescription() | ToolTargets/StaticMeshToolTarget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EMeshLODIdentifier GetEditingLOD() |
ToolTargets/StaticMeshToolTarget.h | ||
virtual void SetEditingLOD
(
EMeshLODIdentifier RequestedEditingLOD |
Configure active LOD to edit. | ToolTargets/StaticMeshToolTarget.h |
Overridden from UToolTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsValid() |
UToolTarget. | ToolTargets/StaticMeshToolTarget.h |
Overridden from IMeshDescriptionProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TArray< EMeshLODIdentifier > GetAvailableLODs
(
bool bSkipAutoGenerated |
ToolTargets/StaticMeshToolTarget.h | ||
virtual FMeshDescription GetEmptyMeshDescription() |
ToolTargets/StaticMeshToolTarget.h | ||
virtual const FMeshDescription * GetMeshDescription
(
const FGetMeshParameters& GetMeshParams |
IMeshDescriptionProvider implementation. | ToolTargets/StaticMeshToolTarget.h | |
virtual EMeshLODIdentifier GetMeshDescriptionLOD() |
ToolTargets/StaticMeshToolTarget.h | ||
virtual TArray< int32 > GetPolygonGroupToMaterialIndexMap() |
ToolTargets/StaticMeshToolTarget.h | ||
virtual bool SupportsLODs() |
ToolTargets/StaticMeshToolTarget.h |
Overridden from IMaterialProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CommitMaterialSetUpdate
(
const FComponentMaterialSet& MaterialSet, |
ToolTargets/StaticMeshToolTarget.h | ||
virtual UMaterialInterface * GetMaterial
(
int32 MaterialIndex |
ToolTargets/StaticMeshToolTarget.h | ||
virtual void GetMaterialSet
(
FComponentMaterialSet& MaterialSetOut, |
ToolTargets/StaticMeshToolTarget.h | ||
virtual int32 GetNumMaterials() |
IMaterialProvider implementation. | ToolTargets/StaticMeshToolTarget.h |
Overridden from IStaticMeshBackedTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UStaticMesh * GetStaticMesh() |
IStaticMeshBackedTarget. | ToolTargets/StaticMeshToolTarget.h |
Overridden from IDynamicMeshProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UE::Geometry::FDynamicMesh3 GetDynamicMesh
(
const FGetMeshParameters& InGetMeshParams |
ToolTargets/StaticMeshToolTarget.h | ||
virtual UE::Geometry::FDynamicMesh3 GetDynamicMesh () |
IDynamicMeshProvider. | ToolTargets/StaticMeshToolTarget.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CommitMaterialSetUpdate
(
UStaticMesh* SkeletalMesh, |
ToolTargets/StaticMeshToolTarget.h | ||
static TArray< EMeshLODIdentifier > GetAvailableLODs
(
const UStaticMesh* StaticMesh, |
ToolTargets/StaticMeshToolTarget.h | ||
static void GetMaterialSet
(
const UStaticMesh* StaticMesh, |
ToolTargets/StaticMeshToolTarget.h | ||
static const FMeshDescription * GetMeshDescriptionWithScaleApplied
(
const UStaticMesh* Mesh, |
Helper to get the mesh description with build scale applied, using/updating the cache as needed | ToolTargets/StaticMeshToolTarget.h | |
static EMeshLODIdentifier GetValidEditingLOD
(
const UStaticMesh* StaticMesh, |
ToolTargets/StaticMeshToolTarget.h | ||
static bool HasNonGeneratedLOD
(
const UStaticMesh* StaticMesh, |
Returns true if the mesh has a non-generated LOD of the requested level. Interprets EMeshLODIdentifier::Default as LOD0 | ToolTargets/StaticMeshToolTarget.h | |
static TArray< int32 > MapSectionToMaterialID
(
const UStaticMesh* Mesh, |
Helper to get the material mapping returned by GetPolygonGroupToMaterialIndexMap for any static mesh | ToolTargets/StaticMeshToolTarget.h |