Plural object lookups and Find modes (Filter, Any, Count) #259

Closed
opened 2026-09-28 14:55:39 +02:00 by meleki · 1 comment
Owner

Plural versions of the object lookups, and more modes for the Find … Match block.

New nodes (all return a snapshot list of objects, destroyed objects never in it, disabled ones counted like the singular nodes do):

  • Objects by name: every scene object with that name, in scene order.
  • Children by name: every object with that name below object, all levels, nearer level first (same order as Child by name).
  • Children: the direct children of an object, or with recursive every object below it, level by level.
  • Objects of asset: every living instance of an asset or container (same rule as Is asset).

Find … Match gets a setting Mode on the Find:

  • First (as today): found / not found, item, index.
  • All: done with items and indices (lists of every hit).
  • Any: done with any (boolean), stops at the first hit.
  • Count: done with count (number).

The Match's outputs follow the mode of the Find its test is built from. A palette entry Filter adds a Find set to All. Existing graphs load as First.

Not in scope: Objects with behavior, Map/Sort blocks.

Plural versions of the object lookups, and more modes for the Find … Match block. New nodes (all return a snapshot `list` of objects, destroyed objects never in it, disabled ones counted like the singular nodes do): - **Objects by name**: every scene object with that name, in scene order. - **Children by name**: every object with that name below `object`, all levels, nearer level first (same order as Child by name). - **Children**: the direct children of an object, or with `recursive` every object below it, level by level. - **Objects of asset**: every living instance of an asset or container (same rule as Is asset). Find … Match gets a setting **Mode** on the Find: - **First** (as today): `found` / `not found`, `item`, `index`. - **All**: `done` with `items` and `indices` (lists of every hit). - **Any**: `done` with `any` (boolean), stops at the first hit. - **Count**: `done` with `count` (number). The Match's outputs follow the mode of the Find its test is built from. A palette entry **Filter** adds a Find set to All. Existing graphs load as First. Not in scope: Objects with behavior, Map/Sort blocks.
Author
Owner

Done in 4e6aeb5, wiki in 38ccef2 (Behaviors, Development).

New nodes (all return a list of Object, a snapshot: destroyed objects never in it, disabled ones are):

  • Objects by name — every scene object with that name, scene order
  • Children by name — every match below object, nearer levels first
  • Children — direct children, with recursive all of them level by level
  • Objects of asset — every instance of an object asset or container (same rule as Is asset, spawned ones included)

Find modes: Find has Mode First / All / Any / Count (First is default and hidden, existing graphs unchanged). Match follows it: done + items/indices, done + any, done + count. First and Any stop at the first hit. Changing the mode drops edges at outputs that are gone, in one undo step. Palette entry "filter" adds a Find on All with its Match.

Found on the way: after adding "filter", "find" + Enter picked Filter (same node type, tie broken alphabetically). The search now ranks by entry id; e2e 6z-v caught it.

Tests: ./check.sh 188 files, 2746 tests, exit 0. find-modes.test.ts (11) + 11 catalog cases. e2e 6z-vii (3 checks), GM_STEPS=1-6 all passed, 278 checks. Counter-checks all fail as expected. Check total in README/wiki: 1535 (computed, not counted). CI run not awaited.

Done in 4e6aeb5, wiki in 38ccef2 (*Behaviors*, *Development*). **New nodes** (all return a `list` of Object, a snapshot: destroyed objects never in it, disabled ones are): - `Objects by name` — every scene object with that name, scene order - `Children by name` — every match below `object`, nearer levels first - `Children` — direct children, with `recursive` all of them level by level - `Objects of asset` — every instance of an object asset or container (same rule as `Is asset`, spawned ones included) **Find modes:** `Find` has *Mode* First / All / Any / Count (First is default and hidden, existing graphs unchanged). `Match` follows it: `done` + `items`/`indices`, `done` + `any`, `done` + `count`. First and Any stop at the first hit. Changing the mode drops edges at outputs that are gone, in one undo step. Palette entry "filter" adds a Find on All with its Match. **Found on the way:** after adding "filter", "find" + Enter picked Filter (same node type, tie broken alphabetically). The search now ranks by entry id; e2e 6z-v caught it. **Tests:** `./check.sh` 188 files, 2746 tests, exit 0. `find-modes.test.ts` (11) + 11 catalog cases. e2e 6z-vii (3 checks), GM_STEPS=1-6 all passed, 278 checks. Counter-checks all fail as expected. Check total in README/wiki: 1535 (computed, not counted). CI run not awaited.
admin added this to the Development project 2026-09-28 21:22:16 +02:00
admin moved this to Done in Development on 2026-09-28 21:22:29 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: meleki/feuerwerk#259