Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL Editor-Runtime Proposal] Reset a Process Node via Alt-Right-Click #45

Open
gregsn opened this issue Jul 15, 2021 · 0 comments
Open

Comments

@gregsn
Copy link
Member

gregsn commented Jul 15, 2021

This proposal addresses #26

We know Alt-Right-Click from vvvv beta.

  • on a pin this leads to a reset to default - adopted by vvvv gamma already
  • on a node this leads to resetting all pins and the state

I'd like to propose to only reset the state of the node. Also resetting the pins should be another command, possibly accessible via a shortcut like Alt-Shift-Right-Click. This proposal here tries to focus on one thing: resetting the state.

Resetting the state is not something that should change the source code or target code. It's the same program, just this one process node shall start fresh at that moment. That's why this proposal tries to address this as an editor-runtime feature, not so much a language feature.

So what does it mean to reset a process node?

  • find all patch instances the process node is used by
  • for all those patches
    • create a new process node instance
    • store it in the patch instance
    • potentially dispose of the old process node instance
      • make sure that no other thread is running that still has access to the state of the process node.

It very much sounds related to the hot-swap, which got quite some love, since the editor-runtime now uses proxy objects for each and every patch. We nowadays know all patch instances and keep track of them allowing us to actually do this process node hot-swap for all of them.

So while the normal hot-swap is for getting the state from an old program to a new program, this feature is about sticking with the program, but resetting the state. In both cases, it boils down to somehow injecting new objects into the running object graph.

To be discussed:

    1. how exactly shall that process node instance get created?
    • a) hard-reset: just get a new instance. don't respect the way the Create fragment is used inside the patch.
    • b) context-aware reset: respect the Create fragment
      • if the create fragment has no connected pins then call this Create fragment with the values stored in the white pins.
      • if there are white links on the inputs: either
        • silently don't do anything
        • create a new instance by feeding default values on those connected pins
        • call the whole Create-patch, so basically not resetting the node but the whole patch it sits in
        • don't do it but give some visual or audio feedback that you didn't do it
    1. do actually want to reset
    • a) all nodes in all patch instances or
    • b) do we want to reset the one process node instance that sits inside the one process patch that we are currently attached to?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant