Replace a model file
edit_modelChange imported models of placed pieces: replace files, edit materials and parts, set LODs, references, or measurements while keeping each piece's ID and placement.
Instructions
Change the imported model of placed pieces (ids), one undo step each; rev refuses a change if the plan moved on. replace swaps the file (library:@ too; every=true: on every piece using it), keeping id, place, size (size=natural takes the file's), finish, overrides and links; the new file is read first, and the reply gives the version loaded, overrides left matching nothing and what the file leaves out. material changes one material by the name model lists: color, mat (an image), repeat (texture scale: 2 halves it), clear. part hides, moves (offset cm: x across, y to the front, z up) or resizes one part by name — the back cushion alone. lod adds a lighter file drawn beyond a camera distance (beyond cm, default 400); detail=always holds the full one. reference keeps a product photo (file, view, part, source) that render_3d ref= shows beside the model; measure keeps a product size (dimension: width|depth|height|.height, cm, source, confirmed) that model compares with the drawing. model inspects; place imports.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cm | No | measure: the product's value, cm | |
| ids | Yes | Pieces whose model changes, e.g. `["f12"]` | |
| mat | No | material: an image over it, `img:trama.png`, or `none` for the file's own | |
| rev | No | Revision the change was prepared on; refused if the plan has moved on since | |
| file | No | replace/lod/reference: the new .obj/.gltf/.glb file (lod: the lighter one; reference: the photo) | |
| hide | No | part: hide it (true) or show it again (false) | |
| note | No | reference: what it shows | |
| part | No | part: which one, by the name `model` lists (`almofada_encosto`) | |
| size | No | replace: `keep` each piece's w/d/h (default) or take the new file's `natural` size | |
| unit | No | replace: unit of the new file's numbers, `m`, `cm`, `mm` or `in` (default: guessed) | |
| view | No | reference: the side the photo shows | |
| clear | No | material/part: back to the file's own | |
| color | No | material: its color `[r,g,b]` | |
| every | No | replace: also every other piece using the same file as `ids` (default: only `ids`) | |
| scale | No | part: resize it about its center, `[x, y, z]` factors | |
| action | Yes | `replace` puts another file in the pieces, keeping each one's id and all the rest; `material` changes one of their materials, `part` one of their parts, by name; `lod` gives them a lighter file drawn from afar; `reference` keeps a photo of the product with them, `measure` a measurement of it | |
| beyond | No | lod: farther than this from the camera, cm, the lighter file is drawn (default 400) | |
| detail | No | lod: `always` draws the detailed file however far (a close review); `auto` switches again | |
| offset | No | part: move it by `[x across, y to the front, z up]` cm from where the file has it | |
| remove | No | reference: take out the one at this index (`model id=` lists them) | |
| repeat | No | material: times its image repeats against the file's mapping (2 draws it at half size) | |
| source | No | reference/measure: where it came from (a product page) | |
| material | No | material: which one, by the name `model` lists (`tecido`) | |
| confirmed | No | measure: measured or stated by the maker, not estimated | |
| dimension | No | measure: `width`, `depth`, `height` or `<part>.height` (its top above the floor) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| v | No | ||
| ok | Yes | ||
| ids | No | ||
| rev | No | ||
| text | Yes |