Apply a material preset
keyshot_apply_material_presetApply a material preset to a specified KeyShot scene object and save the scene to a new file. Choose the object by name or full scene-tree path for precise updates.
Instructions
Resolve a configured material preset, apply it to one scene object, and save a new scene.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scenePath | Yes | Absolute path to an existing KeyShot scene file to open. Input files may be outside the configured output directory. | |
| objectName | No | Scene object name to modify. Provide either objectName or objectPath. | |
| objectPath | No | Full scene-tree path to modify. Prefer this when object names are duplicated. | |
| presetName | Yes | Case-insensitive material preset name returned by keyshot_list_material_presets. | |
| outputScenePath | Yes | Destination path for the saved KeyShot scene. The path must stay inside KEYSHOT_OUTPUT_DIR unless external outputs are explicitly enabled. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the requested operation completed successfully. | |
| data | No | Operation-specific structured result data, or null when unavailable. | |
| error | Yes | Human-readable failure reason, or null after success. | |
| warnings | Yes | Non-fatal conditions the user or agent should review. | |
| errorCode | No | Stable error category for common failures. | |
| outputFiles | Yes | Absolute paths of images or scene files created by the operation. | |
| suggestions | No | Actionable recovery steps for the user or agent. | |
| keyshotStdoutTail | Yes | Truncated tail of KeyShot headless output for diagnostics. |