Download

[FEATURE REQUEST] Blueprint multiple subtract

Hi,

The Blueprint arithmetic nodes for adding and multiplying floats, etc, feature an “add pin” option so one can process multiple values with one node.

a5859a3e22c60c81cc57fd2cd3142548d56e74ef.jpeg

It would be cool if the same would be available for the subtract node where all subsequent values are subtracted from the first one.

8a2388869542ae8d5b0f7f4955c05c22e0d2a2a9.jpeg

So, just a minor thing :slight_smile:

Cheers,
Klaus

I kind of wish they’d remove ‘Add Pin’ and make it a right-click option, it makes the nodes bigger than all the other math nodes and that upsets my OCD :frowning:

I think the reason they haven’t added it to Subtract and Divide nodes is because it can make the order of operations confusing. Add nodes don’t care what order everything is added together, whereas subtract and divide do.

Substract cares about order?

Thus my proposal for the behavior. “…] where all subsequent values are subtracted from the first one”
The order of the subsequent values is again commutative.

Indeed. The subtraction operator is noncommutative. Hence: A-B != B-A
The same is true for the division, in which case the two-values-only node absolutely makes sense…

This request has come up before and it has been considered, but there is a limitation to how the programming of the “Add Pin” currently works. “Add Pins” only works for commutative operations, which subtraction is not. I’ll speak to the Blueprint developers about it and whether or not a work-around can be created.

Well inputs could be subtracted sequentially from up to down

Or the subsequent values could be added in the current fashion and the result be subtracted from the initial value, basically encapsulating:

subnode2.JPG

So its just a matter if a BP node could do this internally…

Uhh then that would barely save a node? :stuck_out_tongue: plus it sounds like custom behavior, you wouldn’t think that it would work that way… kinda confusing.

Yupp. One node less in the spaghettis… :smiley:
How would that be custom? It would just evaluate like a normal chained expression:
10-3-1-4 = 10-(3+1+4).

So no matter if you evaluate : 10-3 = 7 ; 7-1=6 ; 6-4=2
or : 3+1+4=8 ; 10-8=2

Its the same. Nothing confusing about it. Who cares about the internal calculation? :slight_smile:

Yeah you are right it’s the same, I confused myself :wink: