A/B Switch Node

Suggestions and comments for Pandoras Box V5

Moderator: Moderator Group

A/B Switch Node

Postby simonj » Mon Jun 01, 2015 1:42 pm

I am sure there is already an easy way to do this but how about implementing a switch node into WD

For example:
I have two faders and a digital display showing the value of the selected fader position eg opacity readout

If I had an A/B switch node I could use a CS button to select which fader value was displayed in the digital display

AB Switch node.jpg
You do not have the required permissions to view the files attached to this post.
simonj
 
Posts: 19
Joined: Thu Nov 22, 2012 12:24 pm

Re: A/B Switch Node

Postby florian » Mon Jun 01, 2015 3:29 pm

the "if" node lets you swap between two input values given a third.

if you want to use a float value of 0-1 to "mix" between two input values, you need to build a linear interpolation function out of math nodes:
([mix factor]*[variable A]) - (1-[mix factor])*[variable B])
where [mix factor] is a value between 0 and 1.

this works well, but looks convoluted. i have asked for a single node to do this in the past, but it would probably also just work if you could route external values into the "range" node's "output range" fields.
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 154
Joined: Fri Jul 25, 2008 3:49 pm
Location: New York, NY

Re: A/B Switch Node

Postby simonj » Tue Jun 02, 2015 12:17 pm

Thanks Florian - I will give that a go :0)
I thought that a simplified "switch" node would make life a bit easier. Maybe coolux will add it to the wish list?

Cheers
Simon
simonj
 
Posts: 19
Joined: Thu Nov 22, 2012 12:24 pm

Re: A/B Switch Node

Postby simonj » Tue Jun 02, 2015 12:22 pm

Actually while we are on the subject of faders and opacity readouts is there currently an easy way to add some sort of number pad within WD so the user can type in a specific opacity value and the fader will react accordingly?
simonj
 
Posts: 19
Joined: Thu Nov 22, 2012 12:24 pm

Re: A/B Switch Node

Postby florian » Tue Jun 02, 2015 3:09 pm

The "If" node behaves exactly like your switch from what I can tell. If you hover over it with your mouse and press F2, you can change the text to say "switch" instead of "if".

you could set up a text input to type values into. i think that might be handier than a keypad you operate with a mouse.
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 154
Joined: Fri Jul 25, 2008 3:49 pm
Location: New York, NY

Re: A/B Switch Node

Postby simonj » Wed Jun 03, 2015 3:04 pm

I guess the problem I am having with the "if" node is that:

1. We have two possible input parameters available in the node. A & B
A=Fader output#1 B=Fader output#2

2. I almost need a third parameter within the "if" node to connect my CS A/B button to, which operates as follows:

CS Button On Click>Then>True output fader 1 value and False output fader value 2
CS Button On Release Script>Then>True output fader value 2 and False output fader value 1

I have tried using commands directly in the CS button
CS Button On Click
WDNodeEnableOutput,2
WDNodeDisableOutput,1


CS Button On Release Script
WDNodeEnableOutput,1
WDNodeDisableOutput,2


But the Digital Display node only allows one source value and does not dynamically switch

Please see screen grab below for this next bit.....Another alternative (which would be nice) would be to have an "if" node that offers

If
A 9 Value
Equals
B Output State of CS button 1(which would be either 1 or 0) as opposed to Value
Then
True 2 Value
Else
False 3 Value

Thanks for all your help with this mate :D
node state.jpg
You do not have the required permissions to view the files attached to this post.
simonj
 
Posts: 19
Joined: Thu Nov 22, 2012 12:24 pm

Re: A/B Switch Node

Postby florian » Wed Jun 03, 2015 5:21 pm

Hi,

Sorry, I wasn't clear on whether you got it working right or not.

I've attached a project file that demonstrates using the IF node to do what I think it was you wanted it to do.
You do not have the required permissions to view the files attached to this post.
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 154
Joined: Fri Jul 25, 2008 3:49 pm
Location: New York, NY

Re: A/B Switch Node

Postby florian » Wed Jun 03, 2015 5:46 pm

and... because I'm easily amused, attached is another project that uses the Delta node to determine which fader is moving and automatically switch to displaying it's value.
You do not have the required permissions to view the files attached to this post.
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 154
Joined: Fri Jul 25, 2008 3:49 pm
Location: New York, NY

Re: A/B Switch Node

Postby simonj » Thu Jun 04, 2015 10:30 am

You ROCK!

The funny thing is that your Switch project is absolutely identical to the one that I built but couldn't get mine to work properly. Turns out that I had some sneaky node connect/disconnect commands lurking in the c/s button that was causing the problem. Sometimes you can't see the woods for the trees!

The Autoswitch is great, I will run a post mortem on it later today to figure out how you did it.

Many thanks good Sir

Cheers
Simon
simonj
 
Posts: 19
Joined: Thu Nov 22, 2012 12:24 pm


Return to Feature Wishlist V5

Who is online

Users browsing this forum: No registered users and 2 guests

cron