max_eval
Execute raw MAXScript in a live 3ds Max session and return the last expression’s value as JSON. Use it for custom scene operations that structured tools do not cover.
Instructions
Execute raw MAXScript in the live Max session and return the resulting value.
This is the escape hatch for everything the structured tools do not cover.
The code runs verbatim (no wrapper is added), so write a complete
expression and wrap multi-statement code in ( ... ). The value of the
last expression is serialized back to JSON:
Integer/Float -> number, String -> string, Point3 -> [x,y,z], Array -> array (first 2000 items), node/material/anything else -> its name.
Nothing is auto-saved and no undo block is opened for you. Wrap writes in
undo "label" on ( ... ) when you want them reversible.
Args: code: MAXScript source. Multi-statement code must be wrapped in ( ). timeout_seconds: how long to wait before giving up (Max may still be busy).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| timeout_seconds | No |