map_cloth_to_patterns
Map cloth vertices to their correct patterns before draping, so get_cloth_bounds can identify pattern boundaries despite inaccurate CLO counts. Run while pieces are flat.
Instructions
Work out which cloth vertices belong to which pattern, for get_cloth_bounds(pattern_index). Run while the pieces are still flat (after a few simulation steps, before draping).
CLO lists cloth vertices pattern by pattern, but its per-pattern counts are slightly off, so the boundaries are found from the flat layout. Freezing or unfreezing pieces reorders CLO's list (unfrozen pieces first) and changes the mesh; the map is then refused, so map again in the new state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||