execute_python
Run raw Painter Python in an open Substance 3D Painter session when SP_MCP_ALLOW_EXECUTE_PYTHON=1; persist variables between calls and return results via result or printed output.
Instructions
Execute raw Painter Python only when SP_MCP_ALLOW_EXECUTE_PYTHON=1.
Variables survive between calls. Assign to result to return a value; printed
text comes back as output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||