GlobalChannel Presets

Hey, don’t know if this is a question or a bug report. Maybe both.

I have a GlobalChannel for a camera (model) that is created via the SubChannels node like this:

I can access it using a GlobalChannel node just fine:

Storing a preset also works:

It gets written to disk in a folder called presets that resides beside my patch.
The XML also contains the correct values.

Recalling does nothing though:

  • The stored preset “becomes available” only after restarting vvvv.

  • A preset can only be triggered once. Triggering it twice in a row doesn’t work. One has to trigger another preset in between. Which makes it unfortunately unusable (without some hacky workaound) for my intended usecase: Move the camera “manually” and by pressing a button return to a predefined position.

Are these bugs?

Another one I encountered:
When having two presets and creating a third and trying to recall the last one (without restarting vvvv) will trigger one of the first two presets.

Tested with:
7.0-0287

cannot reproduce with “Example Particle Life”

@gregsn here is a repro patch:
GCP.7z (28.6 KB)

There two ways to solve this:

  • make CameraModel a Record
  • snapshot all leave channels (Context.Camera.Yaw…)

Why does it work once?

It gets deserialized on restart. RecallPreset then applies it on the channel. Thus, it overwrites whatever was there before. From that point on this mutating CameraModel is in the channel Context.Camera and this instance gets mutated. It is the same instance as the one in the preset.

Maybe presets should always store a deserialized version and with each RecallPreset call should always deserialize.

Ah ok thanks.

I thought it would always overwrite everything with what has been stored. So for me it would make sense and I’d prefer that behaviour over how it is now.

In upcoming it will work.

1 Like

Thanks a lot 🚀