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
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders)
* Implement nearly the rest of everything
* Move to the tools directory and make it generate nicer default values
* Add category descriptions
* Organize file structure and improve type naming
* Improve book table of contents code
* Add collapsing chapter navigation to the book template
* Add to build workflow
* Clean up site structure
Copy file name to clipboardExpand all lines: Cargo.toml
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,8 @@ members = [
39
39
"node-graph/node-macro",
40
40
"node-graph/preprocessor",
41
41
"proc-macros",
42
-
"tools/crate-hierarchy-viz"
42
+
"tools/crate-hierarchy-viz",
43
+
"tools/node-docs"
43
44
]
44
45
default-members = [
45
46
"editor",
@@ -137,6 +138,7 @@ log = "0.4"
137
138
bitflags = { version = "2.4", features = ["serde"] }
138
139
ctor = "0.2"
139
140
convert_case = "0.8"
141
+
indoc = "2.0.5"
140
142
derivative = "2.2"
141
143
thiserror = "2"
142
144
anyhow = "1.0"
@@ -151,7 +153,7 @@ wgpu = { version = "27.0", features = [
151
153
"spirv",
152
154
"strict_asserts",
153
155
] }
154
-
once_cell = "1.13"# Remove when `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>) is stabilized in Rust 1.80 and we bump our MSRV
156
+
once_cell = "1.13"# Remove and replace with `core::cell::LazyCell` (<https://doc.rust-lang.org/core/cell/struct.LazyCell.html>)
155
157
wasm-bindgen = "=0.2.100"# NOTICE: ensure this stays in sync with the `wasm-bindgen-cli` version in `website/content/volunteer/guide/project-setup/_index.md`. We pin this version because wasm-bindgen upgrades may break various things.
Copy file name to clipboardExpand all lines: node-graph/graph-craft/src/document/value.rs
+26-17Lines changed: 26 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -116,15 +116,15 @@ macro_rules! tagged_value {
116
116
_ => Err(format!("Cannot convert {:?} to TaggedValue",std::any::type_name_of_val(input))),
117
117
}
118
118
}
119
+
/// Returns a TaggedValue from the type, where that value is its type's `Default::default()`
119
120
pubfn from_type(input:&Type) -> Option<Self> {
120
121
match input {
121
122
Type::Generic(_) => None,
122
123
Type::Concrete(concrete_type) => {
123
-
let internal_id = concrete_type.id?;
124
124
use std::any::TypeId;
125
125
// TODO: Add default implementations for types such as TaggedValue::Subpaths, and use the defaults here and in document_node_types
126
126
// 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.
127
-
Some(matchinternal_id{
127
+
Some(matchconcrete_type.id?{
128
128
x if x == TypeId::of::<()>() => TaggedValue::None,
129
129
$( x if x == TypeId::of::<$ty>() => TaggedValue::$identifier(Default::default()),)*
// TODO: Add default implementations for types such as TaggedValue::Subpaths, and use the defaults here and in document_node_types
357
366
// 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.
0 commit comments