Query Model Objects - Include only selected objects - AND?

Thanks @kike for the addition of a Selected only filter.

For certain inputs I like to be able to select an item from a list in Grasshopper while my mouse is in the Rhino viewport. I do this with a text dot and a python script that uses the Eto stepper. The primary text of the text dot can be scrolled with the mouse wheel or with the cursor up / down.

The current issue is that the value from real time scrolling in the popup is only updated in Grasshopper in real time if I add a trigger. The trigger can be set to manual mode.

I’ve tried workarounds where instead of a dot a point is manipulated because the change in position would make the component update and the Z-height is used to get an index of a list but that was really just a workaround to make the synchronisation work.

etoTextDotScroll.py (3.4 KB)

query_selected.gh (11.6 KB)


A small detail that bothers me at the moment is that the component seems to fire an update no matter what object is selected. I think if a Layer filter or Name filter is used together with the Selected only, the component should update only if all these filter conditions are met.

My wishlist item for Query Model Objects is that now that there is a selected True/False button, it makes sense to Enable or Disable the component with a button. For example, I use selection referencing to create live modeling aids for me (e.g. dimensions so I won’t have to measure things). I can use a stream gate to get rid of any outputs when I disable selection referencing.


But this means the component will still trigger and recompute.
One workaround is to use a gate and filter, provided that you have no Layers called “False” this should work too.

And @martinsiegrist you can disable the outputs to only have the component trigger a recompute on the output geometry type.

Thanks for the hint. The components still fire.


For the second screen video, I duplicated the Query Model Objects components and switched the toggles to False. When I move the box, three data dams update. Some without data but it shows the Query Model Objects components fire. I’m expecting that the component updates when both input filters are met. Currently it seems like either or triggers.

Here’s the updated test file:

query_selected_and-please.gh (28.4 KB)