map 2d coordinates to 1d index using blender drivers is there a clean way to convert a 2d vector ( from relative position between two objects ) to 1d index using blender drivers? it should be extendable to add more items later . it is useful to control a grease pencil frame with 'Time Offset' fixed modifier.
I don't know if there is a solution to grease pencil related but in a shader node you could use a formular like
Index = Row * GridWith + Column
to get an index from a 2d Point.