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
{{ message }}
Repository navigation
Stable element IDs instead of indexes in the graph #1821
In order to apply the Path node's vector modification on Table<Graphic> data, it is necessary to be able to identify which row it targets.
We could do this by index (e.g. modification to row 3 within the graphic table). However @Keavon wants to allow nodes to rearrange the table rows without impacting the result.
In order to do this, each row will have an id assigned when creating it. Nodes will be able to get their own id by having the input TaggedValue::MyNodeId (which would be populated during graph pre-processing). In order to avoid cutting and pasting changing the node id (as it does currently) some more logic to check if no such id exists will be added.
Each graphic table must contain unique ids. It is the job of the constructing node to enforce this (e.g. incrementing one of the ids to avoid collision).
This is implemented in impl crate::vector::ConcatElement for super::VectorData and pub fn vector_new_ids_from_hash. The Flatten Vector Elements node uses .concat, where the vector data ids are generated from the hash of the input vector id and layer NodeId which that vector passes through. vector_new_ids_from_hash is used by the repeat nodes and follows a similar concept. A better method could be created that does not rely on the layer ids, maybe the Path node id can be used instead.
changed the title [-]Stable vector row IDs instead of indexes in the graph[/-][+]Stable table row IDs instead of indexes in the graph[/+]on Aug 6, 2025
Activity
[-]Stable vector data ids in the graph[/-][+]Stable vector data IDs in the graph[/+]adamgerhant commentedon Oct 17, 2024
This is implemented in
impl crate::vector::ConcatElement for super::VectorDataandpub fn vector_new_ids_from_hash. The Flatten Vector Elements node uses.concat, where the vector data ids are generated from the hash of the input vector id and layer NodeId which that vector passes through. vector_new_ids_from_hash is used by the repeat nodes and follows a similar concept. A better method could be created that does not rely on the layer ids, maybe the Path node id can be used instead.[-]Stable vector data IDs in the graph[/-][+]Stable vector row IDs instead of indexes in the graph[/+][-]Stable vector row IDs instead of indexes in the graph[/-][+]Stable table row IDs instead of indexes in the graph[/+][-]Stable table row IDs instead of indexes in the graph[/-][+]Stable element IDs instead of indexes in the graph[/+]