Page MenuHome

Nodes: Add dynamic label support for Math Nodes
Needs ReviewPublic

Authored by Charlie Jolly (charlie) on Dec 7 2019, 6:39 PM.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 6211
Build 6211: arc lint + arc unit

Event Timeline

Charlie Jolly (charlie) planned changes to this revision.EditedDec 7 2019, 6:43 PM

This adds label support to sockets much like nodes. This is a proof of concept to see if this approach is acceptable as changing socket name is complicated and hints at future nodes refactor.

This patch works by providing a new socket->label member.

This is only used when drawing the node and if it's not set then it falls back to the socket->name.

While this works well in theory, in practice it becomes an annoyance, this is currently the case with dynamic socket names for the new Voronoi procedural texture.

When playing around or experimenting with settings every time the socket name changes between different settings nodes are disconnected, and one must manually reconnect them again every time.
I'm not against it in principle, clearer socket names are definitely desirable, but not at the expense of keeping connections. Is there a way for socket names to change while still trying to keep current connections live?

@Duarte Farrajota Ramos (duarteframos) this doesn’t disconnect the sockets so the name changes are not disruptive

@Duarte Farrajota Ramos (duarteframos) this doesn’t disconnect the sockets so the name changes are not disruptive

Good to know, glad it doesn't. Keep up the great work :)

Additional labels to consider:

Power - "Exponent"
Logarithm - "Base"
Less Than / Greater Than - "Threshold"
Snap - "Increment"
Pingpong - "Scale"