Blueprint Snippets
On this page
Keep useful graph nodes on a board or in a page: select nodes in any graph editor, copy them, paste them into MOSAIC, and copy them back into any Blueprint later. Blueprint and Material snippets look exactly like the graph editor, because they are the graph editor: MOSAIC rebuilds the nodes in a hidden, temporary graph and shows it with the engine's own graph view.
Pasting nodes
- In any graph editor (a Blueprint's event graph or function, a Material, a Niagara script, an Animation Blueprint...), select the nodes you want to keep and press Ctrl+C.
- On a board, press Ctrl+V (or dock More > Paste Blueprint, or right-click the board > Paste Blueprint). In a page, press Ctrl+V in a block, or type
/blueprintand click Paste Blueprint.
MOSAIC recognises the text the graph editors put on the clipboard and creates a Blueprint snippet (a board item or a page block):
- Its title is the text of the first comment box in the selection, otherwise the first event or function, otherwise "N nodes". On a board, rename it with right-click > Rename.
- Its graph type is detected from the nodes themselves (see Graph types). The type sets the chip's and the item's colour.
- On a board, its size follows the layout of the nodes, within a comfortable board size.
Nothing is created in your project: no asset is created, loaded for editing or marked dirty, and no undo step is added by the preview.
Graph types
MOSAIC reads the classes of the copied nodes and labels the snippet with the graph editor it came from:
| Label | Recognised by |
|---|---|
| Material | Material graph nodes (materials and material functions) |
| Animation Blueprint | Anim graph and state machine nodes, or event graph nodes that belong to an Animation Blueprint |
| Widget Blueprint | Event graph nodes that belong to a Widget Blueprint (widget animation events, widget members, where they were copied from) |
| Niagara | Niagara script nodes |
| MetaSound | MetaSound graph nodes |
| Sound Cue | Sound Cue graph nodes |
| Behavior Tree | Behavior tree nodes and decorators |
| Control Rig | Control Rig graph nodes |
| PCG | Procedural content generation graph nodes |
| Blueprint | Blueprint event graph, function and macro nodes of any other Blueprint |
| Unknown | Nodes of any other graph editor (still copied back as they are) |
A node class that only one editor uses decides at once; Blueprint nodes are then told apart by what they refer to and where they were copied from. A selection of only comment boxes and reroute nodes takes the kind of graph it was copied from (a Blueprint when that is unknown). The chip of each type uses the editor's colour for that kind of asset, so a material snippet looks like a material asset in the Content Browser.
Like the engine's graph editors, every preview (live graph, snapshot or schematic, on boards and in pages) writes its graph type big, bold and faint at its bottom-right corner: "BLUEPRINT", "MATERIAL", "ANIMATION BLUEPRINT", "WIDGET BLUEPRINT", "NIAGARA", "METASOUND", "SOUND CUE", "BEHAVIOR TREE", "CONTROL RIG" or "PCG" (none for Unknown). The label shrinks with small previews and hides when the preview is too small to read it.
How a snippet is shown
| Mode | What you see | When |
|---|---|---|
| Live graph | The engine's graph editor itself: the real node widgets, pins, wires, comments and colours | Blueprint, Widget Blueprint and Animation Blueprint event graph snippets and Material snippets, while a live slot is free (selected, interacted with, or among the biggest on screen) |
| Snapshot | A picture of that same graph editor, rendered in the background and cached | The same snippets the rest of the time: over the live limit, small or rotated on screen, in PNG exports |
| Schematic | MOSAIC's own drawing of the graph in the graph editors' style (see The schematic) | Anim graph, Niagara, MetaSound, Sound Cue, Behavior Tree, Control Rig, PCG and unknown graphs; a live-capable snippet while its first snapshot renders; snippets whose nodes cannot all be rebuilt |
| Card | A compact card: graph type chip, title, node count and a monospace excerpt, with a Copy Nodes button | Show as Card, or text that cannot be parsed |
So a Blueprint or Material snippet looks like the graph editor at any zoom: live when you work with it, a snapshot of the same view otherwise. A live graph with a few nodes that could not be rebuilt says so in its hint ("2 nodes could not be rebuilt").
Switch between the preview and the card with right-click > Show as Card / Show Graph Preview, or Graph preview in the inspector. A small chip on the preview shows the graph type and the number of nodes; its tooltip explains why a snapshot or a schematic is shown ("Snapshot: live preview limit reached", "Schematic preview (Niagara graph)", "Schematic: some nodes need their own Blueprint" or "Schematic: reason").
Blueprint graphs that import completely
A snippet copied from a real Blueprint usually refers to that Blueprint's own members: its variables, functions, custom events, event dispatchers, components and timelines. Before rebuilding the nodes, MOSAIC reads the snippet and gives the hidden helper Blueprint matching stub members, with the same names and pin types (variables with their exact types, functions and custom events with matching parameters, dispatchers, components, the parent class or interfaces of overridden events). The nodes then rebuild completely and look exactly as in their own Blueprint.
If some nodes still cannot be rebuilt outside their Blueprint, the snippet shows the schematic, which always shows every node.
Material graphs
Material (and material function) snippets are rebuilt in a temporary material, so they show the material editor's own nodes, live and in snapshots: the coloured title bars of each expression type, the expression previews, pin colours, comments with their colours. A snippet that includes the material's output node renders too: the output node is rebuilt and wired as in the material editor (graph editors copy it, but no paste can create it, so MOSAIC builds it itself). Nodes that can never be pasted (the output node, a function's entry, macro tunnels) do not count as missing. Up to a tenth of the nodes may fail to rebuild before MOSAIC falls back to the schematic.
The console variable mosaic.GraphPreview.Materials controls this: 1 (default) rebuilds material snippets; 0 always draws the schematic for them, should a material snippet ever misbehave in your project. Type it in the editor's console (for example mosaic.GraphPreview.Materials 0); it applies to snippets shown afterwards.
The schematic
When a snippet cannot be shown by its own graph editor, MOSAIC draws it in the same style:
- A dark grid background, like the graph editors.
- Node title bars coloured by the kind of node: events red, functions blue, pure functions green, macros and flow control grey, casts teal, structs dark blue, variable getters and setters in the colour of their type; material expressions by category, in the material editor's colours (constants, parameters, textures, math, coordinates, utility...), with a colour swatch on colour constants.
- Pins coloured by type (execution white, boolean red, float green, integer cyan, vector yellow, object blue, structs dark blue...), and wires in the colour of their pin with the editors' curve shape.
- Comment boxes with their own colours and titles, reroute dots, and titles that stay readable at any zoom.
The schematic always shows every node of the snippet.
Snapshots
Snapshots are rendered once per snippet and size, in the background, and kept in memory and on disk in the project's Intermediate/Mosaic/GraphCache folder, so boards and pages show them at once the next time. The disk cache is trimmed automatically (the oldest files go first) and can be deleted at any time: MOSAIC renders the snapshots again when needed.
Interacting with a preview
On a board, double-click a snippet (or right-click > Interact with Preview) to work inside it:
- Pan and zoom the graph, and select nodes, like in a graph editor. The graph is read-only: nothing you do changes the snippet.
- Ctrl+C copies the selected nodes (or all of them when none is selected).
- Esc, a click outside the snippet, or right-click > Stop Interacting returns to the board.
In a page, a Blueprint block is always ready to use and never takes over the page's scrolling: the mouse wheel scrolls the page, Ctrl + wheel zooms the graph, a right, middle or left drag pans it, and a click enters the focus mode (the graph gets the wheel and the mouse like in the editor) until Esc, a click outside, or the mouse leaves it for a while. See Blueprint blocks.
A snippet shown as a card switches to its preview when you double-click it.
Open in Editor
Open in Editor pastes the snippet into a new, temporary asset and opens the real asset editor on it, so you see the nodes exactly as in the editor, with the full editor around them:
- Blueprint, Widget Blueprint and Animation Blueprint event graph snippets open in the Blueprint editor (with the stub members they need); Material and material function snippets open in the material editor, with previews.
- On a board: right-click the snippet > Open in Editor. On a card, and on the preview while you interact with it and hover it, the Open in Editor button does the same.
Open in Editor is not available during Play In Editor ("Stop Play In Editor first"). Other graph types (Niagara, MetaSound, Sound Cue, Behavior Tree, Control Rig, PCG, anim graphs) can only be opened by pasting them into an asset of that kind: MOSAIC says so, and Copy then Ctrl+V in that asset's editor does it. When an editor cannot be opened, a notification gives the reason.
Copying nodes back
Right-click a snippet > Copy Blueprint, the Copy Nodes button (on the card, or on the preview when you hover it), or Copy Nodes in the inspector puts the original node text back on the clipboard. Open any graph editor of the same kind and press Ctrl+V.
The nodes paste exactly as they would from any other clipboard: a node that refers to a variable, function, component or event dispatcher of its original Blueprint needs the same member in the Blueprint you paste into (the graph editor reports or creates what is missing, as usual; the stub members MOSAIC uses for the preview are not part of the copied text). Material nodes paste into material graphs, Niagara nodes into Niagara scripts, and so on.
What works for each graph type
| Graph type | Detected from | Preview | Copy back |
|---|---|---|---|
| Blueprint (event graph, function, macro) | Blueprint graph nodes | Live graph / snapshot (schematic if some nodes cannot be rebuilt) | Yes |
| Widget Blueprint | Event graph nodes of a Widget Blueprint | Live graph / snapshot | Yes, into Widget Blueprints |
| Animation Blueprint | Anim graph and state machine nodes; event graph nodes of an Animation Blueprint | Schematic (anim graph); live graph / snapshot (event graph) | Yes, into Animation Blueprints |
| Material | Material graph nodes | Live graph / snapshot (schematic if too many nodes cannot be rebuilt, or with mosaic.GraphPreview.Materials 0) | Yes, into materials and material functions |
| Niagara, MetaSound, Sound Cue, Behavior Tree, Control Rig, PCG | Their graph nodes | Schematic | Yes, into an asset of that kind |
| Unknown | Any other graph node text | Schematic, or card if it cannot be parsed | Yes, into the editor it came from |
Open in Editor works for the Blueprint, Widget Blueprint, Animation Blueprint event graph and Material rows.
Diagnostics
When a snippet shows the schematic instead of the graph editor, MOSAIC writes one line to the Output Log (category LogMosaic) with the reason, once per snippet, and ends it with Run "log LogMosaic Verbose" for details. To see every step:
- Open the console (the Cmd box of the Output Log, or the backquote key) and run
log LogMosaic Verbose. - Show the snippet again (scroll it away and back, or reopen the board).
- The Output Log now lists each step of the rebuild, the nodes that could not be pasted and why.
Run log LogMosaic Log to go back to the normal level. Include these lines when you report a problem with a snippet.
Limits
- Live graphs are heavier than snapshots, so only a few run at a time: up to three per board (the selected snippet and the snippet you interact with first, then the biggest on screen) and four in the whole editor, boards and pages together. The others show their snapshot; View live (page blocks) or interacting takes the slot of the graph seen least recently. A live graph that scrolls out of view gives its slot back after a couple of seconds.
- On a board, a live graph is only used for snippets that are not rotated and are at least about 260 x 160 pixels on screen.
- A page Blueprint block is 360 pixels high by default; drag the grip at its bottom edge for 200 to 900 pixels. It shows the live graph while a slot is free, otherwise its snapshot.
- Search (command palette) looks at a snippet's title and graph type, not at the node text.
- PNG exports draw snippets as their snapshots (or schematics).