Navigation
API > API/Plugins > API/Plugins/MeshPartitionEditor
Modifier to manage layers of custom mesh detail, and project them onto a partitioned mesh
| Name | UProjectMeshLayersModifier |
| Type | class |
| Header File | /Engine/Plugins/Experimental/MeshPartition/Source/MeshPartitionEditor/Public/Modifiers/MeshPartitionProjectSculptLayersModifier.h |
| Include Path | #include "Modifiers/MeshPartitionProjectSculptLayersModifier.h" |
Syntax
UCLASS (MinimalAPI,
prioritizeCategories=("Modifier", "MeshLayers", "AttributeWeights", "Projection"),
Meta=(BlueprintSpawnableComponent, DisplayName="BrushModifier", MegaMeshClassVersion="1"))
class UProjectMeshLayersModifier :
public UE::MeshPartition::UEditableModifierBase ,
public IMeshSculptLayersManager ,
public UE::MeshPartition::ICodeReusableModifier
Inheritance Hierarchy
- FRenderAssetOwnerStreamingState → UPrimitiveComponent → UModifierComponent → UEditableModifierBase → UProjectMeshLayersModifier
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UModifierComponent → UEditableModifierBase → UProjectMeshLayersModifier
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsBodyInstanceOwner
- IPhysicsBodyInstanceOwnerResolver
- IPhysicsComponent
- IModifierBlueprintInterface
- ICodeReusableModifier
- IMeshSculptLayersManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UProjectMeshLayersModifier() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| OnMeshLayersModifierPanelRequestRebuild | TMulticastDelegate_NoParams< void > | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| LayerWeights | TArray< double > | Weights to apply to each sculpt layer. Note the base layer is not included. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| OnMeshLayersPanelRequestRebuild | OnMeshLayersModifierPanelRequestRebuild | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveLayer | int32 | Last layer edited/selected in tools (where 1 is the first sculpt layer, since 0 is the base) Note this is saved for persistence across edits in tools, and does not affect the modifier result | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
| AttributeWeightChannels | TArray< FSculptLayerModifierWeightAttributeEntry > | Optionally specify attribute weight channels to be transferred. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bDisabledByCode | bool | See ICodeReusableModifier::SetDisabledByCode. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
| bDiscardUnsculpted | bool | If enabled, unsculpted triangles will be discarded from the projection mesh, which can make the sculpts offsets faster to apply. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bDrawAffectedBox | bool | Whether to draw the bounds of the projection. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bDrawDebugMesh | bool | Draws edges of the stored mesh for debugging. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bDrawSculptSourceBounds | bool | Whether to draw the bounds of the source geometry that sculpt layers are transferred from (not including sculpt offsets) | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| BoundaryFalloffDistanceFactor | float | The distance over which a smooth falloff is applied for vertices that map to boundary edges of the reference mesh, as a factor of Max Closest Point Distance. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bSculptAbsolutePositions | bool | Whether to transform sculpted vertices directly to corresponding positions of the reference sculpt mesh. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| bUseBoundaryFalloff | bool | Whether to apply a smooth falloff of influence for vertices where the closest point is on a mesh boundary. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| EditExtents | FVector2D | Size of the region to project and sculpt. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| EditVolumeExtents | FVector | Size of the region to sculpt. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| MaxClosestPointDistance | float | Farthest distance to search for a closest point on the reference mesh. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| MaxLayerOffset | TArray< FVector3d > | Cache of maximum offset per layer, across all modifier meshes, used to conservatively predict how much the bounds could be expanded by the modifier. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
| MeshInstance | TSharedPtr< FAsyncMeshInstanceData > | Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
| MeshObject | TObjectPtr< UDynamicMesh > | The mesh that holds the current sculpt layers. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
| MeshObjectChangedHandle | FDelegateHandle | Handle for OnMeshObjectChanged which is registered with MeshObject::OnMeshChanged delegate. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
| ProjectMethod | ESculptLayerProjectMethod | Method to transfer offsets to the mesh partition mesh. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| VerticalExtentDown | float | How far down below the projection mesh the modifier affects megamesh vertices, relative to the direction of projection. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
| VerticalExtentUp | float | How far up above the projection mesh the modifier affects megamesh vertices, relative to the direction of projection. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetActiveLayer() |
Gets the ActiveLayer. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
TArray< FSculptLayerModifierWeightAttributeEntry > GetChannelEntries() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
FName GetLayerName
(
const int32 LayerIndex |
Return the name of the sculpt layer at the provided index | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
void SetChannelEntries
(
const TArray< FSculptLayerModifierWeightAttributeEntry >& EntriesIn |
Directly set the channels to write. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
void SetClosestPointProjection
(
double MaxDistance |
Set projection method to closest point, and sets the max distance | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
void SetEditVolumeExtents
(
const FVector3d& EditExtentsIn |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
void SetLayerName
(
const int32 InLayerIndex, |
Sets the name of the layer at the provided index to the provided name | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
void SetLayerWeight
(
const int32 InLayerIndex, |
Sets the weight of the layer at the provided index to the provided weight | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
void SetSculptLayerMesh
(
const FDynamicMesh3& Mesh, |
Call to directly set the sculpt layer mesh. Cached/dependent data will be automatically updated as well. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Public Virtual
Overridden from UEditableModifierBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ApplyEditWithMesh
(
const FDynamicMesh3& UpdatedMesh |
MeshPartition::UEditableModifierBase implementation. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual TArray< Geometry::FOrientedBox3d > GetBoundsForEdit () |
Bounds to use for editing the modifier. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual void PrepareForEdit
(
FDynamicMesh3& EditMesh |
Apply any custom, modifier-specific initialization to the extracted mesh before launching tooling to edit it. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Overridden from UModifierComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TArray< FBox > ComputeBounds() |
MeshPartition::UModifierComponent implementation. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual TSharedPtr< const MeshPartition::IModifierBackgroundOp > CreateBackgroundOp
(
const MeshPartition::EBuildType InBuildType |
Called to prepare for applying the modifier. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual void DrawVisualization
(
const FSceneView* View, |
Called by the visualizer to give the modifier an oppertunity to render a debug visualization of itself when selected. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual void GatherDependencies
(
MeshPartition::IDependencyInterface& Dependencies |
Gather Dependencies for this modifier, including asset and class dependencies and other relevant data (for example local settings) that affect the modifier apply behavior. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual UE::Tasks::FTask GetAsyncPrepareResourcesTask() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
virtual FGuid GetCodeVersionKey() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
virtual void InitializeModifier () |
UPrimitiveComponent Implementation. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual bool IsTemporarilyDisabledInEditor () |
Returns true if the modifier is temporarily disabled from being processed in any MegaMesh builds. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditImport() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
virtual void PostLoad() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h | ||
virtual void Serialize
(
FArchive& Ar |
UObject. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Overridden from IMeshSculptLayersManager
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool HasSculptLayers() |
IMeshSculptLayersManager implementation. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual int32 NumLockedBaseSculptLayers() |
Modifiers/MeshPartitionProjectSculptLayersModifier.h |
Overridden from ICodeReusableModifier
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsUsed() |
Can be called to determine whether this reusable modifier ended up actually being used, so that it can be cleaned up by its managing system if not. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual void ResetForReuse() |
Called to prep the modifier for reinitializing with entirely different data. | Modifiers/MeshPartitionProjectSculptLayersModifier.h | |
virtual void SetDisabledByCode
(
bool bDisabledIn |
ICodeReusableModifier. | Modifiers/MeshPartitionProjectSculptLayersModifier.h |