transform_solids
Move, rotate, scale, or mirror existing .vmf brushes by ID, owner, material, or bounding box while preserving texture alignment and verifying geometry before writing.
Instructions
Moves, turns, scales or mirrors brushes that are already in a .vmf. Until this existed the write path could only add: a brush placed an inch out of position could not be nudged, only rewritten. Selects by id, owner, material or bounding box, and edits only the plane and texture-axis lines of the brushes it moved -- nothing else in the file shifts by a byte. Texture lock is on by default, so a texture stays where it sits on its face, as in Hammer. The result is read back through read_vmf_solids before the file is touched and the write is refused if any brush stopped being one; volume is reported before and after, and a transform must scale it by its own determinant or something is wrong.
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": {
"path": "<path>"
},
"name": "transform_solids"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | Round every corner to this grid afterwards. Default 0, which rounds nothing. Snapping is what makes a face stop being flat, so what it costs is measured and reported as planarityError rather than assumed to be nothing. | |
| move | No | Translate by this, in Hammer units. | |
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| owner | No | 'world', or a brush entity classname such as func_detail. | |
| scale | No | ||
| backup | No | Copy the file to <file>.bak before writing. Nothing is copied on a no-op. | |
| dryRun | No | Check and report without writing. Every verification runs either way. | |
| mirror | No | ||
| rotate | No | Multiples of 90 are exact; other angles leave the brush off the grid, as Hammer does. | |
| within | No | Brushes lying entirely inside this box. Entirely, not partly: a half-caught brush is how a box selection catches something the caller could not see it had touched. | |
| confirm | No | Required (true) to run this tool: it writes or executes. | |
| material | No | Brushes carrying this on at least one face. Substring, case-insensitive. | |
| solidIds | No | Hammer ids, as read_vmf_solids reports them. | |
| textureLock | No | Default true: the texture stays put on its face. Refused on a scale that stretches one axis more than another, because no texture axis pair can express that -- pass false to accept the stretch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| solids | Yes | ||
| matched | Yes | ||
| written | Yes | ||
| nextStep | Yes | ||
| warnings | Yes | ||
| unchanged | Yes | ||
| backupPath | Yes | ||
| planarityError | Yes |