Author Script operator
author_script_operatorCreate a Script CHOP/DAT/SOP/TOP with a pre-written onCook stub and custom parameters. Generates companion callbacks DAT and infers param types from defaults.
Instructions
Scaffold a Script CHOP/DAT/SOP/TOP with a ready-to-edit onCook(scriptOp) stub and optional custom parameters. Creates the Script op plus its companion callbacks DAT, writes a per-family stub (chan/row/point/numpy) — or your on_cook_body — and appends Float/Toggle/Str custom pars inferred from each default's type. Returns {op_path, callbacks_path, params_added, warnings}. Note: Script ops only cook when something requests them, so a paused timeline + no downstream consumer means no cook (not a bug).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_path | No | Parent COMP to create the Script op inside. | /project1 |
| name | No | Name for the Script op; TD auto-names when omitted. | |
| family | Yes | Script op family — selects the operator type and the onCook stub signature. | |
| custom_params | No | Custom parameters to append on the Script op's 'Custom' page. | |
| on_cook_body | No | Optional body for onCook(scriptOp); injected verbatim. When omitted a per-family no-op stub is used. |