Navigation
API > API/Runtime > API/Runtime/ClothingSystemRuntimeCommon
Implementation of non-solver specific, but common Engine related functionality.
Solver specific implementations may wish to override this class to construct their own default instances of child classes, such as ClothSimConfig_ and CustomData_, as well as override the AddNewLod()_ factory to build their own implementation of UClothLODDataBase_.
| Name | UClothingAssetCommon |
| Type | class |
| Header File | /Engine/Source/Runtime/ClothingSystemRuntimeCommon/Public/ClothingAsset.h |
| Include Path | #include "ClothingAsset.h" |
Syntax
UCLASS (HideCategories=Object, BlueprintType, MinimalAPI)
class UClothingAssetCommon : public UClothingAssetBase
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UClothingAssetBase → UClothingAssetCommon
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UClothingAssetCommon
(
const FObjectInitializer& ObjectInitializer |
ClothingAsset.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ClothConfigs | TMap< FName, TObjectPtr< UClothConfigBase > > | Simulation specific cloth parameters. | ClothingAsset.h |
|
| LodData | TArray< FClothLODDataCommon > | The actual asset data, listed by LOD. | ClothingAsset.h | |
| LodMap | TArray< int32 > | Tracks which clothing LOD each skel mesh LOD corresponds to (LodMap[SkelLod]=ClothingLod). | ClothingAsset.h | |
| PhysicsAsset | TObjectPtr< UPhysicsAsset > | The physics asset to extract collisions from when building a simulation. | ClothingAsset.h |
|
| ReferenceBoneIndex | int32 | Bone to treat as the root of the simulation space. | ClothingAsset.h | |
| UsedBoneIndices | TArray< int32 > | List of the indices for the bones in UsedBoneNames, used for remapping. | ClothingAsset.h | |
| UsedBoneNames | TArray< FName > | List of bones this asset uses inside its parent mesh. | ClothingAsset.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyParameterMasks
(
bool bUpdateFixedVertData, |
Callback envoked after weights have been edited. | ClothingAsset.h | |
void CalculateReferenceBoneIndex() |
Calculates the preferred root bone for the simulation. | ClothingAsset.h | |
ClothConfigType * GetClothConfig () |
Return a cloth config pointer of the desired cloth config type, or nullptr if there isn't any suitable. | ClothingAsset.h | |
const ClothConfigType * GetClothConfig () |
Return a const cloth config pointer of the desired cloth config type, or nullptr if there isn't any suitable. | ClothingAsset.h | |
void InvalidateFlaggedCachedData
(
EClothingCachedDataFlagsCommon Flags |
Called on the clothing asset when the base data (physical mesh, config etc.) has changed, so any intermediate generated data can be regenerated. | ClothingAsset.h |
Overridden from UClothingAssetBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 AddNewLod() |
* Add a new LOD class instance. | ClothingAsset.h | |
virtual bool BindToSkeletalMesh
(
USkeletalMesh* InSkelMesh, |
Create weights for skinning the render mesh to our simulation mesh, and weights to drive our sim mesh from the skeleton. | ClothingAsset.h | |
virtual void BuildLodTransitionData () |
Builds the LOD transition data. | ClothingAsset.h | |
virtual int32 GetNumLods() |
Returns the number of valid LOD's (length of the `ClothLodData_ array). | ClothingAsset.h | |
virtual void InvalidateAllCachedData() |
Called on the clothing asset when the base data (physical mesh, config etc.) has changed, so any intermediate generated data can be regenerated. | ClothingAsset.h | |
virtual bool IsValidLod
(
int32 InLodIndex |
Returns true_ if InLodIndex_ is a valid LOD id (index into `ClothLodData_). |
ClothingAsset.h | |
virtual void PostUpdateAllAssets () |
Propagate the shared simulation configs between assets. | ClothingAsset.h | |
virtual void RefreshBoneMapping
(
USkeletalMesh* InSkelMesh |
Rebuilds the UsedBoneIndices_ array from looking up the entries in the UsedBoneNames_ array, in the `InSkelMesh's_ reference skeleton. |
ClothingAsset.h | |
virtual void UnbindFromSkeletalMesh
(
USkeletalMesh* InSkelMesh |
Helper that invokes UnbindFromSkeletalMesh()_ for each avilable entry in InSkelMesh->GetImportedModel()'s_ LODModel. |
ClothingAsset.h | |
virtual void UnbindFromSkeletalMesh
(
USkeletalMesh* InSkelMesh, |
ClothingAsset.h | ||
virtual void UpdateAllLODBiasMappings
(
USkeletalMesh* SkeletalMesh |
Update all extra LOD deformer mappings. | ClothingAsset.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeChainProperty
(
FPropertyChangedChainEvent& ChainEvent |
Called after changes in any of the asset properties. | ClothingAsset.h | |
virtual void PostEditUndo() |
Restart simulation using this asset after undo change. | ClothingAsset.h | |
virtual void PostLoad() |
Migrate deprecated objects. | ClothingAsset.h | |
virtual void PreEditUndo() |
Stop any simulation from using this asset. | ClothingAsset.h | |
virtual void Serialize
(
FArchive& Ar |
Serialize deprecated objects. | ClothingAsset.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
ClothingAsset.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ChaosClothSimConfig_DEPRECATED | TObjectPtr< UClothConfigBase > | Parameters for how Chaos cloth behaves These will not affect NVcloth For now, we have two configuration parameters so that we can switch between chaos and non chaos at will without losing the original NVcloth data | ClothingAsset.h | |
| ClothConfig_DEPRECATED | FClothConfig_Legacy | Deprecated property for transitioning the FClothConfig_ struct to the UClothConfigBase array, in a new property called `ClothConfigs. |
ClothingAsset.h | |
| ClothLodData_DEPRECATED | TArray< TObjectPtr< UClothLODDataCommon_Legacy > > | Deprecated. Use LodData instead. | ClothingAsset.h | |
| ClothSharedSimConfig_DEPRECATED | TObjectPtr< UClothConfigBase > | Shared by all cloth instances in a skeletal mesh Only supported with Chaos Cloth for now This may not be editable on unused cloth assets | ClothingAsset.h | |
| ClothSimConfig_DEPRECATED | TObjectPtr< UClothConfigBase > | Parameters for how the NVcloth behaves. These will have no effect on Chaos cloth | ClothingAsset.h |