MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / value

Method value

node-graph/graph-craft/src/proto.rs:172–189  ·  view source on GitHub ↗

Construct a new [`ProtoNode`] with the specified construction args and a `ClonedNode` implementation.

(value: ConstructionArgs, path: Vec<NodeId>)

Source from the content-addressed store, hash-verified

170
171 /// Construct a new [`ProtoNode`] with the specified construction args and a `ClonedNode` implementation.
172 pub fn value(value: ConstructionArgs, path: Vec<NodeId>) -> Self {
173 let inputs_exposed = match &value {
174 ConstructionArgs::Nodes(nodes) => nodes.len() + 1,
175 _ => 2,
176 };
177 Self {
178 identifier: ProtoNodeIdentifier::new("core_types::value::ClonedNode"),
179 construction_args: value,
180 call_argument: concrete!(Context),
181 original_location: OriginalLocation {
182 path: Some(path),
183 inputs_exposed: vec![false; inputs_exposed],
184 ..Default::default()
185 },
186 skip_deduplication: false,
187 context_features: Default::default(),
188 }
189 }
190
191 /// Converts all references to other node IDs into new IDs by running the specified function on them.
192 /// This can be used when changing the IDs of the nodes, for example in the case of generating stable IDs.

Callers 15

parseFunction · 0.45
enumerate_hashesFunction · 0.45
generate_node_codeFunction · 0.45
read_attributeMethod · 0.45
parse_node_fnFunction · 0.45
parse_fieldFunction · 0.45
array_of_number_widgetFunction · 0.45
progression_widgetFunction · 0.45
optional_f64_widgetFunction · 0.45
number_widgetFunction · 0.45
color_widgetFunction · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected