setEffectDefinition
Change an effect's name, description, WGSL code, or parameters by effectId, updating every region that uses it. New code is compiled first and rejected if invalid.
Instructions
Change an effect itself by effectId — its name, description, WGSL code or params — and with it every region that uses it. New code is compiled first and refused with the compiler's error if it does not compile. A removed parameter's values drop; the bounds re-clamp the others. Read the current code with getEffect before rewriting it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | No | ||
| params | No | ||
| effectId | Yes | ||
| projectId | No | The project to act on, from listProjects. Omit it only for the project open in the OpenScreen editor, which works only while the app runs. | |
| description | No |