Studio Yotsuba
Back to Node List

Batch Export

batch_export

Writes a list of images (or a single image) to PNG files using a name pattern

Reviewed
Guide available

Input Ports

NameTypeDescription
Images
images
List<Image>
Images to export (e.g. Batch Render frames)
Image
image
Image
Single image to export (used when the list is not connected)
Names
names
List<Text>
Optional names used for the {name} token (e.g. Batch Render names)

Output Ports

NameTypeDescription
Image
image
Image
Pass-through of the first source image at its native size. Scale affects saved files only.
Count
count
Int
Number of files written in this evaluation
Total Inputs
total
Int
Number of source images considered, including files not written.

Parameters

NameTypeDefaultRangeDescription / Options
Directory
directory
DirectoryPath
——

Output folder path. Empty values are initialized from the configured image export directory (project exports/images when a project is saved). Relative paths are resolved from the project directory.

Name Pattern
name_pattern
Text
export_{index}—

File name pattern. Tokens: {name} (from Names), {index} (0-based), {index1} (1-based). .png is appended automatically

Save Mode
save_mode
Enum
Disabled—

Controls when this node writes files

  • DisabledDisabled
    Do not write any file.
  • CreateIfMissingCreateIfMissing
    Write only files that do not exist yet.
  • OverwriteOverwrite
    Overwrite existing files too. Writes again every time the result changes.
  • ManualManual
    Writes only when you press the Save Now button in the inspector. Nothing is overwritten while you tweak parameters.
Save Trigger
_save_trigger
Int
00–999999

Internal counter incremented by the inspector save button

Scale
scale
Int
11–16

Integer nearest-neighbor scale applied before saving

Overview

The standard node for exporting PNG files. It accepts either one image or a list and saves them according to a naming pattern ({name}/{index}). This is an "exit" for the graph, and headless execution (--headless) also exports through this node and the other Export nodes.

  • Side effect: yes (writes files and is excluded from parallel evaluation)

This is the unified batch export node introduced in P15. Connect frames / names from Batch Render to export all variants at once. The export profile (destination, naming pattern, save mode, and scale) is stored as this node's parameters and saved with the project.

Usage tips

  • Keep save_mode: Disabled (the default) while building the graph, then switch it to Overwrite only when exporting. This is a safe habit because the side-effect node runs on every evaluation.
  • Manual mode shows a "Save Now" button in the inspector and writes only when you press it — the safest way to keep tweaking and save just the frames you like, without toggling back to Disabled.
  • Prefer a relative destination path. It resolves from the project folder and creates folders automatically. For an unsaved project, the default is projects/exports/images/.
  • The golden batch-production pairing is batch_render.frames → images + batch_render.names → names + name_pattern: {name}. Each variant name becomes its filename.
  • To export larger assets for a game engine, use scale (integer nearest-neighbor scaling). It changes only the saved files; the image output remains the first native-size image before export, so the graph can continue at native size.

Common pitfalls

  • No files are written: in most cases, either 1) save_mode is still Disabled or
    1. directory is empty. Check the count output to see how many images were saved this time.
  • Old files remain: CreateIfMissing skips existing files and is intended for appending only missing results. Use Overwrite to rebuild everything.
  • Headless execution fails with "no export node": --require-export requires an enabled export node (anything other than Disabled). The standard approach is to override save_mode with Overwrite in the job's overrides.

Technical details

  • It writes nothing while save_mode: Disabled is selected or directory is unset.
  • Characters that cannot be used in filenames are replaced with _ in values from the name list.
  • CreateIfMissing skips existing files, which is useful when appending only missing outputs.

Examples

Exporting Batch Render results

[Seed Range] → [Batch Render] ─ frames → [Batch Export]
                        └ names ─────────↑

With name_pattern: {name}, each variant name becomes the filename.

Automatic export for the finished image

Connect the graph's final result to the image input and set save_mode: Overwrite to save the latest PNG on every evaluation. Use this node as the export endpoint for headless execution (--headless) as well.

Related nodes

  • batch_render — supplies batch-produced frames (the golden pairing)
  • surface_export / aseprite_export / tiled_tileset_export — format-specific exports
  • palette_save — exports a palette
  • preview — when you only want to inspect the result without saving
Back to Node List