Welcome to WSL!

New to the forum? Please read this and this.

Valve

Moderator: Chad

User avatar
Chad
Fusionator
Posts: 1616
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 8 times

Valve

#1

Post by Chad »

Often I wish there was a "valve" tool that would behave like a piperouter (heck, it could be added to a piperouter instead), but could be made to optionally output null.

Right now, most tools don't have an option to ignore an input. It's implied in the GUI and general UX that if a connection exists, the input will provide the data and thus a request is made.

So if you want to see what the tool would look like if there was no input, you have to disconnect it. Instead, I would like the option to insert a valve that allows the pipes to remain in place but with a boolean expression make them appear to the input as disconnected.

This would allow you to animate a pMerge doing merging, or a Merge3D from requesting one of dozens of inputs, allowing the valve to be a means of activating groups of nodes.

User avatar
intelligent machine
Fusionista
Posts: 756
Joined: Fri May 13, 2016 10:01 pm
Answers: 9
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 14 times
Contact:

Re: Valve

#2

Post by intelligent machine »

This would indeed be a great feature for Fusion....so here's my initial attempt at it.
It would be great as a smaller node like a pipe router but I don't see how that is possible.

The toggle will turn the input wire's color from yellow to white (this could also be pink or blue by changing the LINK_Main value).

Let me know if this is anywhere close to what you were looking for.
There may be other features to add to it before it is sent to the reactor.
I thought about an option for text overlay or some other visual queue just incase it is toggled off and a user forgets about it and wonders why their comp isn't working as expected. Another option would be a script button to generate an underlay for just this node and set the color to something garish.
Valve.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
Chad
Fusionator
Posts: 1616
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 8 times

Re: Valve

#3

Post by Chad »

No, I'd want it to not output anything when in the off position. As if the input wasn't connected at all. Some tools check if there is an input and process differently, so I'd like to trigger that directly from the input.

This would cover a lot of the use cases, where a missing input would result in an assumption of black, but some tools assume other things, or show and hide GUI elements based on the connection.

User avatar
SirEdric
Fusionator
Posts: 2384
Joined: Tue Aug 05, 2014 10:04 am
Answers: 12
Real name: Eric Westphal
Been thanked: 4 times
Contact:

Re: Valve

#4

Post by SirEdric »

But isn't a Merge set to a blend of zero behaving exactly like a valve?
The foreground branch will not be processed when setting Blend = 0...?

User avatar
Chad
Fusionator
Posts: 1616
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 8 times

Re: Valve

#5

Post by Chad »

But the BG still gets processed.

I don't want a bypass, I want an open/closed valve that either stops requests or allows them.

User avatar
SirEdric
Fusionator
Posts: 2384
Joined: Tue Aug 05, 2014 10:04 am
Answers: 12
Real name: Eric Westphal
Been thanked: 4 times
Contact:

Re: Valve

#6

Post by SirEdric »

Hmmm.... BG and a DX for the entire lump that comes into the DX's FG?

User avatar
Chad
Fusionator
Posts: 1616
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 8 times

Re: Valve

#7

Post by Chad »

That would return the BG, though. I don't want that. I don't want any requests processed, just as if the input was disconnected.

User avatar
SecondMan
Site Admin
Posts: 4900
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 52 times
Contact:

Re: Valve

#8

Post by SecondMan »

I get it. Interesting idea, I can see the use of it. Would this be something that tools need to be made aware of at the core level? I mean, does a connection itself trigger the assumption of an input, or is it the output of the connected node?

If the latter, can a Fuse output nil? Would that work?

User avatar
intelligent machine
Fusionista
Posts: 756
Joined: Fri May 13, 2016 10:01 pm
Answers: 9
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 14 times
Contact:

Re: Valve

#9

Post by intelligent machine »

SecondMan wrote: Sun Jan 03, 2021 5:04 pmIf the latter, can a Fuse output nil? Would that work?
I tried that on the fuse I attached above but it will still request.


Here's another thought...maybe this is so simple its easy to overlook:
Create a new merge and name it Valve.
Plug your tools that you want to toggle into the Foreground and then the output into the tool you want to test.
Leave the other input alone.
Select the "Valve".
Hit Control+T (Cmd+T) over and over.

User avatar
SecondMan
Site Admin
Posts: 4900
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 52 times
Contact:

Re: Valve

#10

Post by SecondMan »

intelligent machine wrote: Sun Jan 03, 2021 6:30 pmI tried that on the fuse I attached
Ah right - tl;dr :)
intelligent machine wrote: Sun Jan 03, 2021 6:30 pmHit Control+T (Cmd+T) over and over
Yes, but how would you animate that in a comp?

User avatar
intelligent machine
Fusionista
Posts: 756
Joined: Fri May 13, 2016 10:01 pm
Answers: 9
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 14 times
Contact:

Re: Valve

#11

Post by intelligent machine »

I missed the part about wanting to animate it. :cry:
Without the ability to see the code inside merge or pipe routers or a way to script the input swap, the only other hack I can think of involves python and hard coded key presses that are triggered by an animatable parameter....more than I'm interested in attempting as it looks like a dead end anyway.

User avatar
SecondMan
Site Admin
Posts: 4900
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 52 times
Contact:

Re: Valve

#12

Post by SecondMan »

intelligent machine wrote: Sun Jan 03, 2021 9:30 pmas it looks like a dead end anyway
I think that's the whole idea :D :D