public interface ISubGraphValuesWho to ask what an unfed sub-graph input is worth, when it is not a literal.
Remarks
Inlining decides a port's value mid-walk, and until this interface that decision could only read numbers — #1074. Flatten took an unfed interface input's value from node.Values or the port's declared default, so anything a containing graph wanted to compute about that expansion had nowhere to arrive. Folding could not simply be moved earlier: a sub-graph node nested inside a compound is written against that compound's parameters with that expansion's overrides, and both are discovered by this walk.
⚠ The implementation is asked which keys it claims rather than being handed a spelling. A Texts key beginning = is a Raven expression in Vixen.Editor.TextureGraph and nowhere else; teaching this assembly that character would make one front end's convention the graph model's. Claims is what keeps it where it belongs, and what lets a second front end adopt the seam without agreeing about the character.
⚠ Only unfed inputs are offered. A wire beats a value written on the port, exactly as it beats a number typed into one, so a port that is connected is never resolved — which is also what stops an implementation paying to compute a value nothing would read.
Methods (2)
bool Claims(PortDefinition port, string key)Whether a key written on a sub-graph node holds a value for one of its inputs.
IReadOnlyDictionary<string, float[]> Resolve(SubGraphScope scope, IReadOnlyDictionary<string, string> claimed)What the claimed keys of one sub-graph node are worth.
Used by (4)
- FlattenerVixen.Editor.NodeGraph
- NodeGraphCompilerVixen.Editor.NodeGraph
- SubGraphsVixen.Editor.NodeGraph
- TextureGraphCompilerVixen.Editor.TextureGraph