Add Get/Set properties nodes and a breadcrumb for opened sub-behaviors

Get properties / Set properties work like their variable counterparts:
one port per chosen property, an unconnected input writes its inline
value. A port chosen from the built-in list keeps that property's field
and default (height starts at 100, color is a colour field). "object" is
reserved for the fixed input, checked by the command and on load.

The property picker names the owning type ("Sprite width"), and text
fields can now carry a suggestion list; Get/Set property use it.

Double-clicking a call node shows the path of opened behaviors under the
graph header. Clicking an entry jumps back and trims the path; choosing
a behavior any other way hides it. Reopening a behavior already on the
path steps back to it instead of repeating it. The bar shows before the
graph switches, otherwise it clips the graph that was just fitted.

The "Add node..." header button is gone; nodes come from the context menu.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-11 15:07:07 +02:00
1 parent e9fa592078
commit 854ae2e756
35 files changed
+1044 -101

No files matched your search

+6 -4
View File
@@ -8,6 +8,7 @@ import {
type GraphEdge,
type GraphNode,
isValidPortName,
fixedPortKeys,
nodeDef,
} from '../graph';
import type { Asset, TextureFrame } from '../model/Asset';
@@ -210,9 +211,9 @@ function readField(key: string, f: Record<string, unknown>): StructFieldDef | nu
return isFieldKind(f.kind) ? { key, kind: f.kind as FieldKind } : null;
}
function normalizePorts(raw: unknown): DeclaredPort[] {
function normalizePorts(raw: unknown, fixed: readonly string[]): DeclaredPort[] {
const ports: DeclaredPort[] = [];
const seen = new Set<string>();
const seen = new Set(fixed);
for (const item of Array.isArray(raw) ? raw : []) {
const p = asRecord(item);
const key = typeof p.key === 'string' ? p.key : '';
@@ -234,7 +235,8 @@ function normalizeGraph(raw: unknown): Graph {
const n = asRecord(item);
const id = typeof n.id === 'string' ? n.id : '';
const type = typeof n.type === 'string' ? n.type : '';
if (!id || nodeIds.has(id) || !nodeDef(type)) continue;
const def = nodeDef(type);
if (!id || nodeIds.has(id) || !def) continue;
nodeIds.add(id);
// Params carry both settings and inline input values, so there is no schema to coerce against.
const params: PropertyBag = {};
@@ -243,7 +245,7 @@ function normalizeGraph(raw: unknown): Graph {
if (stored !== undefined) params[key] = stored;
}
const node: GraphNode = { id, type, x: toNumber(n.x), y: toNumber(n.y), params };
const ports = normalizePorts(n.ports);
const ports = normalizePorts(n.ports, fixedPortKeys(def));
if (ports.length > 0) node.ports = ports;
if (n.collapsed === true) node.collapsed = true;
graph.nodes.push(node);