New node: Math (#2121)

* 2115 IP

* Initial implementation of Expression node

* Register Expression Node

* Add Expression DocumentNode Definition

* DocumentNodeImplementation::Expresssion in guess_type_from_node

* Move expression.rs to graphene-core

* WIP: Investigating 'exposed' & 'value_source' params for Expression property

* Node graph render debug IP

* Single input can change node properties; complex debug IP

* Fix epsilon in test

* Handle invalid expressions in expression_node by returning 0.0

* Run cargo fmt

* Set the default expression to "1 + 1"

* Hardcode the A and B inputs at Keavon's request

* Rename and clean up UX

* Move into ops.rs

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Jacin Yan 2024-12-17 18:08:14 +11:00 committed by GitHub
parent 79b4f4df7b
commit 3423c8ec13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 152 additions and 8 deletions

View file

@ -27,7 +27,7 @@ mod tests {
use super::*;
const EPSILON: f64 = 1e10_f64;
const EPSILON: f64 = 1e-10_f64;
macro_rules! test_end_to_end{
($($name:ident: $input:expr => ($expected_value:expr, $expected_unit:expr)),* $(,)?) => {