GN Socket Rename

examples/gn-socket-rename/

Compare and Random Value socket identifiers collapsed onto reused names in 5.2; enabled-name lookup wires on 4.5, 5.1, and 5.2

Rendered headless by the example itself. Select it to enlarge.

witnesses A_INT and Min_001 present on 4.5.11 and 5.1.2, absent on 5.2.1. --legacy-ids exits 5 only on 5.2. Evaluated 16 verts and gauge_h 1.80 on eight column verts; the still draws the column graduations from gauge_h, so an unwired Random Value renders a blank column

tags geometry-nodes

runs on 4.5 LTS · 5.1 · 5.2 LTS

blender --background --python examples/gn-socket-rename/gn_socket_rename.py --

falsify it Breaks the contract on purpose and must exit 5, on 5.2+

blender --background --python examples/gn-socket-rename/gn_socket_rename.py -- --legacy-ids

A jo-block (steel plinth + copper column) whose Geometry Nodes tree witnesses the 5.2 socket-identifier collapse on FunctionNodeCompare and FunctionNodeRandomValue. Follows geometry-nodes-python.

On 4.5.11 and 5.1.2, Compare INT exposes A_INT / B_INT and Random Value FLOAT exposes Min_001 / Max_001 / Value_001. On 5.2.1 those identifiers are gone — the live sockets reuse A / B and Min / Max / Value. Looking up the unique enabled socket of a given name wires on all three. Hard-coding the pre-5.2 identifiers raises on 5.2.

What it witnesses: identifier-agnostic wiring produces a 16-vert evaluated mesh (plinth + column) with POINT gauge_h == 1.80 on exactly the eight column verts. Compare INT 7 > 2 switches the column in (vert count). Random Value FLOAT with min=max=HEIGHT is stored as a named attribute (Random is a field; using it as a constant Size source evaluates to 0 — hazard found while authoring). zmax 1.94 is the construction axis, not the Random axis.

Scaffolding matches cross-version-property-delete (check() returns, argparse naive-API flag, FATAL wrapper). That example does not version-branch, so the per-version inventory assert is the gn-modifier-inputs shape.

What failure each check would catch:

--legacy-ids is the falsifier: wire by Min_001 / A_INT. It exits 0 on 4.5.11 and 5.1.2 (those identifiers still exist) and 5 on 5.2.1. Unlike --same-axis, it is not red on every binary.

No SMOKE_SKIP. Do not pass deviation= to check_framing.

Run#

blender --background --python gn_socket_rename.py --
blender --background --python gn_socket_rename.py -- --legacy-ids
blender --background --python gn_socket_rename.py -- --output gauge.png

The --output render path measures framing against the Layer 1 band via examples/gallery_framing.py (exit 10 on violation) before writing the still.

Render#

The still witnesses both axes, not only the Compare one. The column's graduations — a tick every 0.1 m in from each vertical corner, a heavier one every 0.5 m — are drawn by the column shader from the evaluated POINT gauge_h attribute, and only up to its stored height. With Compare broken the column is missing; with Random Value unwired the Store default leaves gauge_h at 0 and the column renders blank copper. Both were rendered to confirm it. The shader is render-path only and nothing in it feeds back into check(); the column is also turned to 18° for the still so two faces show, which check() cannot see because it reads object-space vertices.

The gauge is staged as a height gauge on a bench: it stands on a granite surface plate, and a brass scriber carriage clamped on the column reaches out to rest its point on a wrung stack of three steel gauge blocks. The bench props are built after check() in dress_bench and parented to the gauge object; no assertion reads them.

Exit codes#

Per-script sequential checks. 9 is a valid check code; there is no rule against it. 10 is the shared framing helper.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
4Identifier inventory wrong for this Blender version
5Pre-5.2 identifier missing (--legacy-ids on 5.2)
6Enabled-name socket lookup failed
7Evaluated vert count off (Compare did not switch the column in)
8Evaluated zmax off closed form
9POINT gauge_h not 1.80 on eight column verts
10Gallery framing violation
12--output produced no file

The blender-smoke workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the needs-5.1 PR label, or manual dispatch). Smoke does not pass --output. Its catalog falsifier is --legacy-ids (expects exit 5; 5.2+ only; SKIP on older Blender).

Source

examples/gn-socket-rename/gn_socket_rename.py View the script on GitHub →
A copper height-gauge column engraved with graduations on a granite surface plate, its brass scriber carriage reaching out to touch a stack of steel gauge blocks.