From 5d5993bccaf6032f12c35a5b3db849787b62d458 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Wed, 18 Feb 2026 01:21:02 -0800 Subject: [PATCH] Fix opacity not being included in alpha of Fill type when converted from Table (#3785) * Fix opacity not being included in alpha of Fill type when converted from Table * Avoid unwrap, I guess --- node-graph/libraries/vector-types/src/vector/style.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-graph/libraries/vector-types/src/vector/style.rs b/node-graph/libraries/vector-types/src/vector/style.rs index 10079efd..4330045f 100644 --- a/node-graph/libraries/vector-types/src/vector/style.rs +++ b/node-graph/libraries/vector-types/src/vector/style.rs @@ -2,6 +2,7 @@ pub use crate::gradient::*; use core_types::Color; +use core_types::color::Alpha; use core_types::table::Table; use dyn_any::DynAny; use glam::DAffine2; @@ -123,7 +124,9 @@ impl From> for Fill { impl From> for Fill { fn from(color: Table) -> Fill { - Fill::solid_or_none(color.into()) + let alpha = color.get(0).map(|c| c.alpha_blending.opacity).unwrap_or(1.); + let color: Option = color.into(); + Fill::solid_or_none(color.map(|c| c.with_alpha(c.alpha() * alpha))) } }