using Rokojori; using Godot; namespace Rokojori; [GlobalClass,Tool] public partial class AdjustmentsDesigner: Node { [Export] public AdjustmentsStack stack = new AdjustmentsStack(); [Export] public bool autoUpdate = false; [Export] public WorldEnvironment environment; [ExportToolButton( "Update Adjustments" )] public Callable updateAdjustmentsButton => Callable.From( ()=> { ProcessStack(); } ); public override void _Process( double delta ) { if ( ! Engine.IsEditorHint() ) { return; } if ( ! autoUpdate ) { return; } ProcessStack(); } void ProcessStack() { stack.GenerateAdjustmentsTexture(); if ( environment != null ) { environment.Environment.AdjustmentColorCorrection = stack.adjustmentsTexture; } } }