create_topstitch_style
Creates a topstitch style with custom stitch length, thread thickness, and offset by copying a saved template and importing it, working around CLO API limits.
Instructions
Create a topstitch style with a given stitch length, thread thickness and offset from the stitched line (CLO's API cannot set these on a style, so a saved style file is copied with the values changed and imported). Returns its style_index for add_topstitch.
The stitch's shape and colour come from a template: a style saved from CLO once (select a topstitch in the Object Browser, set its Shape, e.g. Overlock, and colour in the Property Editor, click the save icon in its Topstitch row) and passed as template_path with a template name; later calls just name the template.
Args: name: Name for the new style. stitch_length_mm: Length of each stitch in mm (default: the template's). thread_thickness_mm: Thread thickness in mm (CLO shows it as Tex: 0.2 mm = 40 Tex). offset_mm: Distance of the stitching from the line or seam it follows, in mm. template: Which saved template to use, e.g. "default" or "overlock". template_path: A .sst saved from CLO, stored as this template (first time only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| template | No | default | |
| offset_mm | No | ||
| template_path | No | ||
| stitch_length_mm | No | ||
| thread_thickness_mm | No |