Navigation
API > API/Plugins > API/Plugins/ChaosClothAssetEditor
Description
Converts a legacy UClothingAssetCommon (the cloth asset driven by UChaosClothingSimulationFactory) into a new UChaosClothAsset built from the DF_LegacyClothingAssetTemplate Dataflow template.
The new asset's Dataflow graph is baked from the legacy values so it is directly editable as if authored from scratch:
- Geometry is one-shot baked: a cloth collection built from the legacy FClothPhysicalMeshData is stored on the new asset as the "ImportedSimClothCollection" Dataflow variable override (and the legacy asset's owning SkeletalMesh as "RenderSkeletalMesh"). The template consumes these via a Get-Variable node there is no per-asset import node and no live reference back to the source legacy asset, so the conversion is not re-evaluated on Reimport.
- One WeightMapNode is appended per legacy weight map (values rescaled to [0,1] with the consuming Simulation node's Low/High adjusted by LegacyMax).
- When the legacy asset has a TetherEndsMask weight map, LongRangeAttachmentsNode is switched into custom-tether generation: two SelectionNodes ("LegacyTetherEnds" for the fixed-end set, "LegacyAllSimVertices3D" for the dynamic-end set) are spliced upstream of LongRangeAttachmentsNode and wired into CustomTetherData[0]. When no TetherEndsMask is present, the template's default wiring (FixedEndSet = MaxDistanceConfig.KinematicVertices3D) is kept.
- Scalar UChaosClothConfig / UChaosClothSharedSimConfig values are written onto the existing Simulation* config nodes via UProperty reflection.
TODO: multi-LOD only clothing LOD 0 is imported. Legacy assets with multiple LODs lose all but LOD 0 on conversion. The new asset's Dataflow graph has no multi-LOD authoring yet either.
| Name | UE::Chaos::ClothAsset::UE_EXPERIMENTAL |
| Type | function |
| Header File | /Engine/Plugins/ChaosClothAssetEditorCore/Source/ChaosClothAssetEditor/Public/ChaosClothAsset/LegacyClothingConverter.h |
| Include Path | #include "ChaosClothAsset/LegacyClothingConverter.h" |
namespace UE
{
namespace Chaos
{
namespace ClothAsset
{
UE::Chaos::ClothAsset::UE_EXPERIMENTAL
(
5. 8,
"This converter is experimental. Use at your own risk!"
)
}
}
}