update_material_paths
Rewrites material bindings and asset paths under a subtree from an old prefix to a new one after materials or textures move, keeping USD references pointed at their new location.
Instructions
Rewrite every path under a subtree that starts with old_prefix to start with new_prefix instead: relationship targets, such as material bindings, and asset paths, such as texture files.
Use it after materials or textures move, so bindings and textures point at their new place. The match is a plain text prefix, on any relationship or asset path: a joint's bodies or a shader's source file change too if they match, so end the prefix with "/" and keep it specific. Nothing checks that the new paths exist. Kit's undo doesn't record the change, and a failure part way keeps the edits made before it. The answer counts the paths changed and names the prims.
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": {
"old_prefix": "<old_prefix>",
"new_prefix": "<new_prefix>"
},
"name": "update_material_paths"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prim_path | No | The subtree to update; the whole stage by default | / |
| new_prefix | Yes | What to put in its place, e.g. "/World/Materials/" | |
| old_prefix | Yes | The start of the paths to change, matched as text, e.g. "/OldProject/Materials/" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |