Change a shader as one complete property
extends "res://scripts/runtime/script_base.gd"func run(_context: Dictionary = {}) -> Variant:
var treatment: Dictionary = {
"preset": "none",
"layers": [{"preset": "warm", "intensity": 0.45}],
"pixelSize": 4,
"colorLevels": 5,
"edgeStrength": 0.65,
"distortionAmount": 0.01,
"distortionSpeed": 0.7,
"tintColor": "#ffffff00"
}
await ChangeGUIElementProperty({
"guiId": "style_lab",
"elementId": "preview_art",
"property": "shader",
"value": treatment
})
return trueThe shader is a Dictionary containing the layer list and shared parameters. Replace the shader property with that complete object. Do not assume a dotted key such as shader.layers.0.intensity is a general deep-update command in every GUI action route.
The example applies a mild Warm effect to the illustration while leaving the separate Label clean. The same shared action is available to action lists and visual scripting when the value is supplied as a structured Dictionary.
If the property selector is built from the current element, apply an element shader once in the editor so shader is an authored field. The GDScript call above supplies its exact key directly.
