Toggle multiple Metahopper's "group toggle" at once by a master button?

Is there a way to toggle several of Metahopper’s “group toggle” at once, like through a ‘master’ toggle?

Some context: To run a solver like Galapagos I want to disable all groups that are not essential for the optimalisation run.

I find Metahopper’s “group toggle” quit convenient in daily use to tun on/off certain group while developing. But it becomes cumbersome to individually go through all groups I want to disable before a run, and enable them afterwards.

Any tips or tricks how to best accommodate a script logic for such case?

Hello,

I searched in MetaHopper dll but the internal methods seem to be private.
One idea could be to directly code this behaviour. However there are two workarounds :

1/ Define a giant group that contains all your objects, except the group toggles. This can be controlled by a single Group Toggle.

2/ Use MetaHopper’s components to get all groups on the canvas - possibly filter them by nickname - and objects in those groups, then toggle the components from there.

MetaHopperGlobalToggle.gh (12.7 KB)

1 Like

Hi @magicteddy , this will work !

Had no idea that ‘get groups’ would offer these additional outputs.