export_mesh_library
Exports a scene's MeshInstance3D children as a MeshLibrary for GridMap use. Choose .tres (readable text) or .res (binary), and optionally limit which mesh items are exported.
Instructions
Export a scene's MeshInstance3D children as a MeshLibrary for GridMap. The outputPath extension sets the format: .tres is text (prefer it: readable, diffable), .res is binary. Not for 2D scenes. meshItemNames picks a subset, else all. Overwrites silently. Returns: outputPath, itemCount, itemNames read from the saved library; warnings leads when a requested name was not exported. Errors if no valid meshes, or while a runtime session is live.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"scenePath": "<scenePath>",
"outputPath": "<outputPath>"
},
"name": "export_mesh_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scenePath | Yes | Scene file path relative to the project | |
| outputPath | Yes | Output path for the MeshLibrary (relative to project). Its extension sets the format: .tres writes text, .res writes binary. Prefer .tres. | |
| projectPath | Yes | Path to the Godot project directory | |
| meshItemNames | No | Names of specific mesh items to export. Omit to export all. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No | ||
| itemCount | Yes | ||
| itemNames | Yes | ||
| outputPath | Yes |