delete_material_expression
Remove one named node from a material graph, safely clearing nodes one at a time to avoid the duplicate parameters that bulk deletion leaves behind.
Instructions
Delete ONE node from a material graph by name. Deliberately one at a time, and that is the safe way to empty a graph: the engine's bulk delete_all_material_expressions can leave half the nodes behind with no error, and a rebuild on top then produces duplicate parameter names that no parameter listing reveals (duplicates collapse by name). Loop this instead, re-reading get_material_expressions until the count reaches 0. The underlying engine call also returns false while having done the work, so count the nodes rather than trusting the flag.
Returns: { material_path: string, expression_name: string, success: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material_path | Yes | Full path to the material (e.g., '/Game/Materials/MyMaterial.MyMaterial') | |
| expression_name | Yes | Name of the material expression to delete |