Navigation
API > API/Runtime > API/Runtime/ClothingSystemRuntimeCommon
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UClothingAssetBase
- UClothingAssetCommon
References
| Module | ClothingSystemRuntimeCommon |
| Header | /Engine/Source/Runtime/ClothingSystemRuntimeCommon/Public/ClothingAsset.h |
| Include | #include "ClothingAsset.h" |
Syntax
class UClothingAssetCommon : public UClothingAssetBase
Remarks
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()](API\Runtime\ClothingSystemRuntimeCommon\UClothingAssetCommon\AddNewLod)_ factory to build their own implementation of UClothLODDataBase_.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< FName, TObjectPtr< UClothConfigBase > > | ClothConfigs | Simulation specific cloth parameters. | |
| PRAGMA_DISABLE_DEPRECATION_WARNINGSTObjectPtr< UClothingAssetCustomData > | CustomData | Custom data applied by the importer depending on where the asset was imported from. | |
| TArray< FClothLODDataCommon > | LodData | The actual asset data, listed by LOD. | |
| TArray< int32 > | LodMap | Tracks which clothing LOD each skel mesh LOD corresponds to (LodMap[SkelLod]=ClothingLod). | |
| TObjectPtr< UPhysicsAsset > | PhysicsAsset | The physics asset to extract collisions from when building a simulation. | |
| int32 | ReferenceBoneIndex | Bone to treat as the root of the simulation space. | |
| TArray< int32 > | UsedBoneIndices | List of the indices for the bones in UsedBoneNames, used for remapping. | |
| TArray< FName > | UsedBoneNames | List of bones this asset uses inside its parent mesh. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UClothingAssetCommon
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ApplyParameterMasks
(
bool bUpdateFixedVertData, |
Callback envoked after weights have been edited. | |
| void | Calculates the preferred root bone for the simulation. | ||
| void | DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
||
| ClothConfigType * | Return a cloth config pointer of the desired cloth config type, or nullptr if there isn't any suitable. | ||
| const ClothConfigType * | Return a const cloth config pointer of the desired cloth config type, or nullptr if there isn't any suitable. | ||
| 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. |
Overridden from UClothingAssetBase
| Type | Name | Description | |
|---|---|---|---|
| int32 | AddNewLod () |
* Add a new LOD class instance. | |
| 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. | |
| void | Builds the LOD transition data. | ||
| int32 | GetNumLods () |
Returns the number of valid LOD's (length of the `ClothLodData_ array). | |
| void | Called on the clothing asset when the base data (physical mesh, config etc.) has changed, so any intermediate generated data can be regenerated. | ||
| bool | IsValidLod
(
int32 InLodIndex |
Returns true_ if InLodIndex_ is a valid LOD id (index into `ClothLodData_). |
|
| void | Propagate the shared simulation configs between assets. | ||
| void | RefreshBoneMapping
(
USkeletalMesh* InSkelMesh |
Rebuilds the UsedBoneIndices_ array from looking up the entries in the UsedBoneNames_ array, in the `InSkelMesh's_ reference skeleton. |
|
| void | UnbindFromSkeletalMesh
(
USkeletalMesh* InSkelMesh |
Helper that invokes [UnbindFromSkeletalMesh()](API\Runtime\ClothingSystemRuntimeCommon\UClothingAssetCommon\UnbindFromSkelet-\1)_ for each avilable entry in InSkelMesh->GetImportedModel()'s_ LODModel. |
|
| void | UnbindFromSkeletalMesh
(
USkeletalMesh* InSkelMesh, |
Unbinds this clothing asset from the provided skeletal mesh | |
| void | UpdateAllLODBiasMappings
(
USkeletalMesh* SkeletalMesh |
Update all extra LOD deformer mappings. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeChainProperty
(
FPropertyChangedChainEvent& ChainEvent |
Called after changes in any of the asset properties. | |
| void | PostEditUndo () |
Restart simulation using this asset after undo change. | |
| void | PostLoad () |
Migrate deprecated objects. | |
| void | PreEditUndo () |
Stop any simulation from using this asset. | |
| void | Serialize deprecated objects. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UClothConfigBase > | ChaosClothSimConfig_DEPRECATED | 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 | |
| FClothConfig_Legacy | ClothConfig_DEPRECATED | Deprecated property for transitioning the FClothConfig_ struct to the UClothConfigBase array, in a new property called `ClothConfigs. |
|
| TArray< TObjectPtr< UClothLODDataCommon_Legacy > > | ClothLodData_DEPRECATED | Deprecated. Use LodData instead. | |
| TObjectPtr< UClothConfigBase > | ClothSharedSimConfig_DEPRECATED | 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 | |
| TObjectPtr< UClothConfigBase > | ClothSimConfig_DEPRECATED | Parameters for how the NVcloth behaves. These will have no effect on Chaos cloth |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGSvoid | Cached data are now all rebuilt by calling InvalidateCachedData |