Clusters with start toggle / disable enable toggle

Hello,
I am trying to make a cluster that contains a loop inside (anemone). My problem is that any time i drop the cluster on canvas or connect something to its inputs the loop would restart (unless I disable the whole cluster).
I thought that a toggle of some kind could work here. Unfortunately there is no “start” input in anemone or octopus loop. I tried using MetaHoppers “Enable/Disable” component to switch loop start on and off but for some reason it doesnt work inside clusters (similar topic HERE)

Has anyone got an idea how to create such cluster with toggle?
Thanks

There are three different things in play here - clusters, metahopper toggles, and anemone. All three of these things interact differently with solution / expiration logic than is normal, so this can get complicated.

Clusters always recompute their entire “innards” every time they are placed or one of their inputs change. This is unavoidable - you cannot expire just “part” of a cluster, which is why metahopper’s enable/disable does not work inside clusters.

You could introduce something like a dispatch to function as a “switch” to prevent any data from entering the loop:

You’ll notice I’m also using Anemone’s Fast loop rather than normal loop components - because these complete the loop in a single “expire/solve” cycle rather than many, they often play better with other parts of grasshopper that do unusual things with expiration logic.

Does that help?

1 Like

Hello Andrew

Thank you for your response. I tried something similar with stream gate instead of dispatch. It didn’t work. Now i know why - it indeed needed to be Anemone fast loop or Octopus loop as ‘standard’ anemone loop would output fine when you open the cluster but back out on main canvas it would output first iteration result. Your solution works like a charm!

Thank you for your help and, as I didn’t have that opportunity before, for all your great plugins!
Have a great weekend!

1 Like