Boolean Switch:
The XIS_BooleanSwitch node is designed to act as a logical gate that controls the flow of boolean data within a node-based system. Its primary function is to determine whether a boolean value should be passed through or not, based on the state of an enabling switch. This node is particularly useful in scenarios where conditional logic is required, allowing you to dynamically control the output based on specific conditions. By using this node, you can streamline workflows that depend on boolean logic, making it easier to manage complex decision-making processes within your projects.
Boolean Switch Input Parameters:
enable
The enable parameter is a boolean input that acts as the control switch for the node. When set to True, the node allows the boolean input to pass through to the output. If set to False, the node outputs None, effectively blocking the boolean input. This parameter is crucial for determining whether the node is active or inactive, and it defaults to True, meaning the switch is enabled by default.
boolean_input
The boolean_input parameter is an optional boolean value that the node processes. If the enable parameter is set to True, this input is passed to the output. If enable is False, the output will be None, regardless of the value of boolean_input. This parameter allows for flexible input handling, as it can be left unconnected if not needed.
Boolean Switch Output Parameters:
boolean_output
The boolean_output is the result of the node's execution. If the enable parameter is True, the boolean_output will reflect the value of the boolean_input. If enable is False, the output will be None. This output is essential for integrating the node's logic into larger workflows, as it determines the flow of boolean data based on the node's configuration.
Boolean Switch Usage Tips:
- Use the
enableparameter to control the flow of boolean data dynamically, allowing for conditional logic in your workflows. - Consider leaving the
boolean_inputunconnected if you want the node to act as a simple on/off switch without processing any input.
Boolean Switch Common Errors and Solutions:
Missing boolean_input
- Explanation: The node may not function as expected if the
boolean_inputis not provided whenenableis set toTrue. - Solution: Ensure that the
boolean_inputis connected or set a default value to avoid unexpected behavior.
Unexpected None Output
- Explanation: If the output is
Nonewhen you expect a boolean value, it is likely because theenableparameter is set toFalse. - Solution: Check the
enableparameter to ensure it is set toTrueif you want the boolean input to pass through.
