Fix gradient tool

This commit is contained in:
0hypercube 2023-08-21 13:03:18 +01:00 committed by Keavon Chambers
parent 6173662a40
commit 9a39c4a0cc
8 changed files with 159 additions and 113 deletions

View file

@ -239,6 +239,13 @@ impl NodeInput {
NodeInput::Inline(_) => panic!("ty() called on NodeInput::Inline"),
}
}
pub fn as_value(&self) -> Option<&TaggedValue> {
if let NodeInput::Value { tagged_value, .. } = self {
Some(tagged_value)
} else {
None
}
}
}
#[derive(Clone, Debug, PartialEq, Hash, DynAny)]