execute_script
Perform unsupported Blockbench operations by running JavaScript code directly in the renderer, with full access to all Blockbench globals and objects.
Instructions
Run arbitrary JavaScript inside Blockbench's renderer for anything not covered by a dedicated tool. The code has access to all Blockbench globals (Project, Cube, Group, Texture, Animation, Undo, Canvas, Outliner, Format, Formats, ...) and receives a params object. Return a JSON-serializable value. Use sparingly; prefer dedicated tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Function body. Example: "return Cube.all.map(c => c.name)". Wrap edits in Undo.initEdit/finishEdit and call Canvas.updateAll() after geometry changes. | |
| params | No | Optional object passed in as `params`. |