displaz icon indicating copy to clipboard operation
displaz copied to clipboard

Hook access to geometry selection

Open c42f opened this issue 9 years ago • 2 comments

When a vertex is clicked on, it would be useful to be able to get the selection as a hookable event, and to get the geometry label and vertex which was selected.

c42f avatar Sep 06 '16 02:09 c42f

@Ross-Batten

c42f avatar Sep 06 '16 02:09 c42f

Possible design:

$ displaz -hook select:vertex selected_geometry_index
select:vertex "label1" 0
select:vertex "label2" 1
select:vertex "label7" 100
...

That is, the payload selected_geometry_index returns the geometry label and the selected (0-based) index in the original dataset (ie, the index of the dataset as loaded, not as internally reordered by displaz). Using the label in this scheme is a little annoying in that it'll have to be quoted, or the spaces escaped.

c42f avatar Sep 11 '16 00:09 c42f