Int:
The PrimitiveInt node is designed to handle integer values within a node-based system, providing a straightforward way to work with whole numbers in your AI art projects. This node is particularly useful when you need to define or manipulate integer values, such as setting parameters, counters, or indices in your workflows. By encapsulating integer operations, it ensures that the values remain within the specified range, preventing errors that might arise from invalid inputs. The node's primary function is to accept an integer input and return it unchanged, making it a reliable component for maintaining integer data integrity throughout your project.
Int Input Parameters:
value
The value parameter is the core input for the PrimitiveInt node, representing the integer value you wish to process. This parameter accepts any integer within the range of -sys.maxsize to sys.maxsize, which is the maximum range supported by the system's architecture. The value parameter is crucial as it directly influences the node's output, ensuring that the integer data is correctly passed through the node. The parameter is designed to be flexible, allowing for dynamic adjustments and control after generation, which is particularly useful in iterative or conditional workflows.
Int Output Parameters:
INT
The output of the PrimitiveInt node is an integer, denoted as INT. This output is the same integer value that was input into the node, ensuring that the data remains consistent and unchanged. The primary purpose of this output is to provide a reliable integer value that can be used in subsequent nodes or operations within your workflow. By maintaining the integrity of the integer data, this output ensures that your project can accurately perform calculations, comparisons, or any other operations that require integer inputs.
Int Usage Tips:
- Use the
PrimitiveIntnode to define static integer values that can be reused across multiple nodes, ensuring consistency in your workflow. - Leverage the control-after-generate feature to dynamically adjust integer values based on the results of previous operations, allowing for more flexible and adaptive workflows.
Int Common Errors and Solutions:
Invalid integer range
- Explanation: The input integer is outside the allowable range of -sys.maxsize to sys.maxsize.
- Solution: Ensure that the integer value you input falls within the specified range. If necessary, adjust your calculations or logic to produce a valid integer.
Non-integer input
- Explanation: The input provided is not an integer, which the node cannot process.
- Solution: Verify that the input is a valid integer. If you are using a variable or expression, ensure it evaluates to an integer before passing it to the node.
