mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 06:58:11 +08:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user