Skip to content

Let an item handle stand in for its sockets (520.32.1) - #241

Merged
BradyAJohnston merged 3 commits into
mainfrom
item-chaining
Oct 7, 2026
Merged

BradyAJohnston merged 3 commits into
mainfrom
item-chaining

Conversation

@BradyAJohnston

Copy link
Copy Markdown
Owner

Patch release 520.32.1.

An Item handle now stands in for its sockets:

pos = g.Position() >> cap.items.vector()        # into .input, continues from .output
g.SetPosition(offset=cap.items.float(0.5))      # as a value: .output
sep.items.float("Spacing") >> g.Math.add(1.0)   # left of >>: .output
  • One-sided items raise for the side they lack: a Separate Bundle item has only an output, a Combine Bundle item only an input.
  • Zone state items keep asking for initial, current, next or result, since they have two inputs and two outputs; the handle itself raises with that list. For-each items, main_items and generated_items are ordinary two-role items and get the behaviour.
  • This restores code that fed a Separate Bundle item straight into a node, which 520.32.0 broke by returning handles (squishy_volumes does this). Explicit .output keeps working.

Typed through an __rshift__ overload so node >> item is the item's output socket class.

An Item can be passed as a node argument or used on either side of >>:
as a value or on the left it is item.output, on the right it is
item.input, and the chain continues from item.output. One-sided items
raise for the side they lack, and zone state items keep asking for a
role, since they have two inputs and two outputs. This restores code
that fed a bundle item straight into a node before 520.32.0 returned
handles. Version 520.32.1.
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.34%. Comparing base (783b4f6) to head (e59d662).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #241   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         101      101           
  Lines       30252    30277   +25     
=======================================
+ Hits        29752    29777   +25     
  Misses        500      500           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BradyAJohnston
BradyAJohnston merged commit 7f36c16 into main Oct 7, 2026
9 checks passed
@BradyAJohnston
BradyAJohnston deleted the item-chaining branch October 7, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant