Basic node logic question: Connecting toggle/trigger to switch

 

Hi guys,

Probably super simple question here.
I am trying to connect a toggle to a Switch, so instead of manually entering 0 or 1 as "Selected" I can just hit the toggle or trigger instead.
Of course I understand that a toggle is a boolean operation and I will only be able to change between Value 1 and Value 2.

How do I do this? Thanks!




   speakerbee

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

The boolean (toggle) is called Logical in Aximmetry. You can directly convert the Logical data type to the integer Selected pin. For example, using a Copy Logical module, you can expose the Selected pin as a toggle on the Dashboard panel:

Here you can see which data types can be directly converted into which other data type: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/flow-editor/pin/#pin-data-type-conversion 

Of course, you can also do this with a Trigger data type. In this case, you could use an Incremental module. If you set the Incremental's Max Value to 1, then you can move between 0 and 1. But since you are using this with a switch, you probably want to increase the Max Value higher than 1, so you could switch between other values in the Switch module:

Alternatively, there is also a Toggle module that you could use instead of the Incremental module. But if you plan to use the Switch module with more than one value, then you should use the Incremental module. Otherwise, you could use an If module instead of the Switch module.

Note, I am using the Scalar Peeker above to see the current value of the Incremental module and to force the Incremental module to be executed. Otherwise, if the Incremental module is not connected to an active output then it won't be executed and it won't store any value, more on that here: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/flow-editor/module/#module-execution

Warmest regards,

 
Profile Image
speakerbee
  -  

Thanks Eifert, exactly what I was looking for!