Nodos presets
File → Preferences → OGraf Studio → Nodos keeps chosen templates of the open document set as presets in a
Nodos engine. Turn on Keep Nodos up to date, enter the engine's address (localhost:11003 by
default, the Editor API port of Nodos 1.4.0.b5023 and later; earlier builds use localhost:50052)
and the node menu category (| separates sub-categories), and tick the templates to send.
Studio remembers these choices in this browser. A template must support real-time playback: the
Nodos page plays it in real time.
Studio's server connects to Nodos as an editor and sets each ticked template as a node preset. The preset uses a stable identifier based on the template's ID, so equally named templates remain distinct. Renaming a template or unticking and choosing it again keeps its node class; the menu entry shows the current template name. Existing unique preset names are retained. Older conflicting names are separated; recreate nodes whose former class was shared by multiple templates. Picking the preset in the Nodos node menu creates an ElectroNode that shows the template at the composition's output size. The preset supplies URL and Resolution settings. A canvas crop sets the output dimensions; it does not change the authored composition or discard the crop's position.
Keeping presets up to date
Studio sends a ticked template again whenever its edits pause, and every ticked template when it connects to Nodos. Nodes made from a template take the new version and restart their ElectroNodes; pin values set in Nodos stay. The page shows the result of each template's last update. Unticking a template stops its updates and keeps its preset in Nodos. Shared controls and asset-slot changes also update chosen inactive templates. Disabling sync, unticking a template, switching documents or changing the destination cancels preparation that has not been sent. A registration already sent to Nodos may still finish.
What Studio serves
Studio's server serves what the ElectroNode loads below its /nodos/<preset name>/ route:
the exact certified OGraf package and nodos.html, a page that loads the graphic in real time
with its public data defaults, then plays its first step, on a transparent page background. Studio
uses an immutable URL for each update. A rejected update leaves accepted files intact. Connection
timeouts permit a new connection on the next update. Studio
keeps these files in memory and sends them again when its editor reconnects, so keep it running while Nodos
plays the template. Studio's server listens only on 127.0.0.1, so Nodos must run on the same
machine. In development, run npm run start:all so that Studio's server runs beside the editor.
The server retains the current and previous accepted versions for each engine and preset. Older and uncertain registrations remain fetchable for a 60-second grace period. Storage is bounded to 256 MiB total, 64 MiB per package, 4,096 files per package and 128 versions, with at most eight pending updates. When full, it refuses a new update instead of removing protected graphics; wait for old staged versions to expire or reduce package size.
Input slots
Create an ElectroNode and add reusable input slots such as TextureInput1, TextureInput2 and
DataInput1. Give each slot that visible name in Nodos. When its URL loads, ElectroNode matches
the design's declarations to existing slots by name and applies their declared Nodos types.
A type change preserves the pin identity and disconnects its old wires; an already matching type
preserves its current value and connections. Missing slots and duplicate names appear in the
ElectroNode preview. Missing slots are not created automatically; add them in Nodos before using
the page. URL changes retain the graph's input slots.
Fields and pin types
Use Data → Nodos inputs to select which operator fields become input slots. Field keys supply
the reusable slot names. Data → Operator controls still controls which fields playout can edit.
New templates start with no data slots selected. Older templates keep their existing declarations
until you change the Nodos selection. Internal fields remain available to bindings, animations and
Rules. Object and array defaults omit internal descendants. Changing a matched value updates the
graphic through updateAction and its configured data transition.
MCP clients can set exposeToNodos on add_data_field and update_data_field to select or
deselect a public field. The field's nodosType controls its native value type separately.
A live-media source's tag supplies a texture slot name, such as TextureInput1. The Nodos page
connects matching GPU textures to the graphic's live-media renderer. Several objects can consume
the same tag. The generated page lists its requirements in a nodos-inputs JSON element; preset
definitions contain URL and Resolution settings.
| Data field | Nodos pin type |
|---|---|
| Text, text area, color, image URL, file path, select | string |
| Number, percentage | double |
| Integer, duration | int |
| Boolean | bool |
| Object, gradient | nos.Dict |
| Select multiple | [string] |
| Array | [T] of its items' pin type |
| A field of a Nodos type | that type, such as nos.fb.vec4 |
Nodos has no arrays of arrays, so an array of arrays becomes [nos.Dict], each Dict holding one
inner array as items; the page unwraps them before the graphic sees them.
Nodos types
While Studio is connected to Nodos, a field's Type list also offers the engine's own types under Nodos types: its structs, tables and enums whose values a template can hold. Choosing one gives the field that type's structure, an object of the type's fields or a select of the enum's values, and declares that type for the matching input slot. The structure stays as the type has it; choose another type to edit the field again.
Saved fields keep their chosen structure even while the engine is disconnected. If the engine's definition changes, choose the type again to update that structure. Switching engines or disabling the connection clears the discovered type list without changing saved fields. Unsupported resources, recursive shapes and oversized arrays are excluded. Integer defaults must fit their native range; 64-bit integers are limited to JavaScript's safe range. Invalid values are rejected instead of being rounded or wrapped.
Studio uses the Nodos Editor SDK's generated protocol and type serializers, with its own request timeouts and cancellation handling. This preserves connection recovery and the distinction between an explicit engine rejection and an update whose outcome is unknown.
Requirements and limits
An exposed data field or live-media tag cannot be named URL, Resolution, ShowPreview,
Output or Audio: ElectroNode reserves those names. This workflow needs the companion
ElectroNode host support for reading page declarations and matching their names/types to existing
slots, together with the typed window.nodos.onData data bridge and nodos-input texture bridge.
Process SDK 21.5 supports typed data forwarding, but an SDK version alone does not guarantee
the complete page-declaration, slot-matching and texture contract.
Presets set the cropped output size through ElectroNode's Resolution (nos.fb.vec2u) pin.
Rendering follows the frame rate of the Nodos thread that pulls the node; presets do not set a
FrameRate pin. ElectroNode 0.2.0.b49 or later provides this Resolution pin contract; that baseline
alone does not guarantee reusable-slot support.
Sending a preset needs a Nodos engine whose Editor API takes node presets (Editor API 5.1). Verify initial playback, matched data changes and live textures in your installed Nodos version; OGraf certification does not test the Nodos host or its data/texture bridges.
This wraps one template. Whole-set coordinated OGraf export and Studio's multi-template
preview remain separate features. It does not replace .ogs saving or add a coordinated Nodos
controller.