You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node-graph/graph-craft/src/document/value.rs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,9 @@ macro_rules! tagged_value {
127
127
// Tries using the default for the tagged value type. If it not implemented, then uses the default used in document_node_types. If it is not used there, then TaggedValue::None is returned.
128
128
Some(match concrete_type.id? {
129
129
x if x == TypeId::of::<()>() => TaggedValue::None,
130
+
// Table-wrapped types need a single-row default with the element's default, not an empty table
131
+
x if x == TypeId::of::<Table<Color>>() => TaggedValue::Color(Table::new_from_element(Color::default())),
132
+
x if x == TypeId::of::<Table<GradientStops>>() => TaggedValue::GradientTable(Table::new_from_element(GradientStops::default())),
130
133
$( x if x == TypeId::of::<$ty>() => TaggedValue::$identifier(Default::default()),)*
0 commit comments