Let Channels unbind when Merge is not updated anymore

Hey!

Don’t know if this is either a bug report or a feature requests, but here is a behaviour that puzzled me a bit using Merge to bind Channels.

My aim was to be able to bind two Channels together only when I want to, ie. be able to bind/unbind at will.
For this, I expected that putting Merge inside an If region would work; but the result is:

  • as long as the If region is not executed, there is no binding
  • once the If region is set to run, Merge works as expected and the 2 Channels are now bound together
  • but when I toggle the If region off again, the bind is still running; ie. once the binding is done once, it seems it is kept alive indefinitely.

I think it would be great to have this working as I would have expected to be able to control channel syncing on/off at will.

Thanks for considering!
T

Use a ManageProcess region instead of the If region.
Set Lifespan to Short.
Now when disabling the region you’ll end the lifetime of the Merge, which should feel like deleting it.

In general some nodes behave in a way that their existence has an effect already. With disabling the If region you don’t call Update anylonger, but the Merge node is still alive and wired up.

1 Like

Thanks! Works like a charm.
It was also the trick suggested by @sebescudie

I should think of ManageProcess more often indeed when I need to emulate deleting/recreating nodes indeed.

Out of curiosity, why does this method not work for my other question in the chat, for forcing GetPresetNames to refresh in case of creation/deletion of files outside of vvvv during runtime?

The Presets service gets created by different mechanism.

You can’t manage the lifespan of Presets as there is currently no Presets process node that you could surround with a ManageProcess region. The lifetime of the Presets is managed by the application (search for Services, IStartup to learn more)

Use ReloadAllPresetsFromDisk.

1 Like