duplicate_material_expression
Copy an expression node within a UMaterial, optionally rename it, then recompile and mark the material dirty without saving. The copy's output stays unwired.
Instructions
Copy one expression node of a UMaterial asset into the same material, optionally renamed, then recompile the material and mark it dirty without saving. The copy keeps the source position and settings (a parameter keeps its name) and its output is unwired. Returns duplicate_node and expression_count.
Returns: { material_path: string, source_node: string, duplicate_node: string, duplicate_class: string, expression_count: number }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | Object name of the expression to copy, as listed by get_material_expressions. | |
| material_path | Yes | Full asset path of the UMaterial. | |
| new_node_name | No | Object name for the copy; when taken, a unique variant is used (read duplicate_node). Default: a name the engine picks. |