Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Store Metadata as data flows through the graph

Open adamgerhant opened this issue 1 year ago • 0 comments

Since footprints will have to be returned from the render output due to caching not working with monitor nodes, this system can also be expanded to the click targets, overlays, and vector modify. Each node will be responsible for processing metadata and adding it to the spread sheet, instead of the render node (?). This means all spreadsheets will need to contain a field for metadata.

Transforms on vector data will be stored in a column of type Vec<(NodeId, DAffine)>. Each transform node right (left?) multiplies the last matrix in the vec, and each path node adds a new element to the vec. It is essentially the responsibility of the data type and nodes to provide the vector modify functionality for manipulating the various path nodes. The data cannot be returned from monitor nodes due to caching, as a downstream transform could change without the monitor node being updated. The two solutions to this could be to start execution from the path node, or return the data with the render output. Returning data from the render output means that the path node would store the its vector data in a column of type Vec<(NodeId, VectorData)>

~~When displaying the overlay for vector data in path_overlays, the click targets from the first path node are used, but the transform is derived from the layer. The transform should be used as it flows through the monitor node in the path node, not the layer.~~

~~For example, create a vector with a path, then repeat it. The graphic group has an identity transform, while the vector data stores the full transform. This means the vector~~

~~The best solution is to not return the transform to viewport from the render output as is currently done. Instead, monitor nodes are used to return the transform to document space (downstream transforms * data transform). The downstream transforms are tracked by separating the document to viewport and downstream transforms in the footprint. Then the editor will use the document to viewport transform to calculate the full transform from that monitor node to viewport space (monitor transform * document to viewport). This solves the caching issue since the monitor nodes will only need to return their data when the data changes, not when the document to viewport in the footprint changes.~~

~~In general, no metadata should be returned from the render output due to its destructive nature.~~

adamgerhant avatar Oct 19 '24 18:10 adamgerhant