Change Table<Color> node inputs to Color where only one value is used so GPU nodes work (#3096)

* graster-nodes: change `Table<Color>` params to `Color` where only one value is used

* Re-add support for Color and Option<Color>

* Add warning when a default value isn't parsed

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
Firestar99
2025-08-28 15:16:56 +02:00
committed by GitHub
co-authored by hypercube
parent 9987112cc9
commit 95ef8a5343
8 changed files with 46 additions and 23 deletions
+1 -4
View File
@@ -307,7 +307,7 @@ fn black_and_white<T: Adjust<Color>>(
GradientStops,
)]
mut image: T,
#[default(Color::BLACK)] tint: Table<Color>,
#[default(Color::BLACK)] tint: Color,
#[default(40.)]
#[range((-200., 300.))]
reds: PercentageF32,
@@ -327,9 +327,6 @@ fn black_and_white<T: Adjust<Color>>(
#[range((-200., 300.))]
magentas: PercentageF32,
) -> T {
let tint: Option<Color> = tint.into();
let tint = tint.unwrap_or(Color::BLACK);
image.adjust(|color| {
let color = color.to_gamma_srgb();