x3d_modify_node
Update X3D node attributes by DEF name with a JSON of field changes, then retrieve the complete modified XML document.
Instructions
Modify field values on a DEF'd node in an X3D scene.
Finds the node by its DEF name and updates the specified attributes.
Returns the complete modified X3D XML document.
Args:
x3d_source: Complete X3D XML document string or file path.
def_name: The DEF name of the node to modify (e.g., "RedMat", "MainView").
field_changes: JSON string of field=value changes to apply.
Example: '{"diffuseColor": "0 1 0", "transparency": "0.5"}'
Values are set as XML attribute strings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| def_name | Yes | ||
| x3d_source | Yes | ||
| field_changes | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |