Skip to content

Allow cumulative math operations to dynamically add pins #1150

@Naros

Description

@Naros

Description

Specific mathematical operations, such as Addition, Multiplication, bitwise AND, and bitwise OR, allow the addition of operands in any order due to the cumulative nature of the operation, and yield the same result.

This is an effective way to reduce node bloat for specific operations by inputting multiple values into a single node and having it handle the operation's associativity.

Implementation ideas

Currently, if an operation needs to compute A * B * C, it requires two multiply nodes, with the result of the first two operands fed into the second as input, and the final operand. This produces an associative operation (A * B) * C. But given that associativity and cumulativity semantics on multiplication do not influence the outcome, this can be reduced down to an Input1 * Input2 * Input3 * .... InputN operation.

  1. Have the operator node extend the editable pin interface.
  2. Have the interface determine whether the [+] button is available based on the node's operator type. For example, addition and multiplication work, whereas subtraction and division do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions