material
Manage Godot materials and shaders: read, write, create, save, and load resources, set parameters, and apply shader templates from the scene tree.
Instructions
Material and shader operations. Read: read. Write: set_params, create, save, load. Shader: shader_read, shader_write, shader_load_file, shader_save_file, shader_list_templates, shader_apply_template. 运行时操作,仅影响当前执行上下文。如需持久化,请编辑 .tscn 文件。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | shader_write/shader_save_file: shader code | |
| action | Yes | Operation type | |
| params | No | set_params: parameter key-value pairs | |
| file_path | No | shader_load_file/shader_save_file: file path | |
| node_path | No | Scene tree node path | |
| shader_path | No | create: shader resource path | |
| project_path | No | Godot project directory path | |
| material_type | No | create: material type | |
| resource_path | No | save/load: resource path | |
| template_name | No | shader_apply_template: template name | |
| load_autoloads | No | Load Autoload context (default true) | |
| material_index | No | Material index (optional, default 0) |