Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Remove type check when iterating upstream

Open adamgerhant opened this issue 1 year ago • 1 comments

I changed the upstream traversal for the tools to only iterate over the same type so that modifications to the output of a Boolean were applied to the vector data after the operation, not an upstream path node. This was a hacky solution, and we need better support for selection which path node to modify. This can be done with dots in the layer panel. More information in comment above existing_node_id

adamgerhant avatar Oct 19 '24 18:10 adamgerhant

Yes, that is why I created the generate_from_hash, which generates stable yet unique ids based on the NodeId of the merge node that the vector data flows through. It is implemented for the flatten vector elements in #2049, here where I needed the functionality to add the joining of vector data with the pen tool (this should be split into a separate PR).

It is also currently used by the repeat and copy to point nodes so that each new vector data has stable and unique ids.

This is still a work around to allowing the path tool to operate directly on vector data. A more robust method is necessary for the path node to input and output a GraphicGroup. I suppose each vector data will need a unique ID that the path node can reference, since the merge node id will change when it is copy and pasted.

adamgerhant avatar Oct 22 '24 03:10 adamgerhant

@Keavon Noted a crash on this branch, but I have not been able to reproduce it

adamgerhant avatar Oct 22 '24 03:10 adamgerhant

Well, I couldn't find the crash either, so we'll have to live with it and fix it once we can reproduce it in the wild.

Keavon avatar Oct 26 '24 18:10 Keavon