Load Mesh Batch (Glob)
Load a batch of meshes with one wildcard string
- meshes
- textures
- file_paths
Load Mesh Batch (Glob) is the batch loader for people who don't want to reorganize their hard drive to suit their node graph. Instead of "point me at a folder and load everything in it," you give it a glob pattern like /path/to/export/*.glb and it loads whatever matches - even across subfolders, with **. If you have models scattered across a project tree and you don't want to copy them all into ComfyUI/input/3d, this is the node.
It's part of ComfyUI-GeometryPack ("ComfyUI libigl"), Andrea Pozzetti's 3D geometry toolkit for ComfyUI. Like every loader in the pack it produces the shared TRIMESH type, so the output plugs straight into any of the pack's processing, analysis, or preview nodes.
How it works
One input does the real work: glob_pattern, which uses Python's glob with recursive=True. That means *.glb grabs a directory's worth, and **/*.obj walks the whole tree. The ** is the superpower here - folder-based loaders can't reach into subdirectories, this one can. Whatever matches gets loaded through the pack's mesh_io (.obj, .ply, .stl, .off, .gltf, .glb, .fbx, .dae, .3ds, .vtp), sorted, and returned as a list.
The secondary input, sort_by, is a combo with name (alphabetical) or modified_time as options - pick the latter when you want "most recently exported first" so the newest scan is at the front of your batch. The node also fingerprints matched files by their modification times, so editing a file on disk triggers a re-run instead of silently reusing cached output.
Inputs and outputs
glob_pattern- the pattern; the author's own tooltip example is/path/to/folder/*.glb.sort_by-nameormodified_time, defaults toname.
Outputs, all lists of the same length:
meshes- the loadedTRIMESHobjects.textures-IMAGEper mesh, extracted from the material (base color for GLB/GLTF, MTL images for OBJ). No texture → a small black placeholder, so the lists stay aligned.file_paths- the full path strings. This is the sneaky-useful one: wire it into the pack's filename/save nodes and you can write results back next to their sources.
A pattern that matches nothing returns empty lists with a console warning rather than crashing - convenient when a folder legitimately has zero files yet, annoying when you wanted to know you typo'd the path.
Installing
Standard for the pack: search "GeometryPack" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Restart after. Heads-up: the pack installs via the experimental comfy-env package and drags in pixi plus a heavy isolated environment (Blender, CGAL, libigl, VTK) on first launch, so the initial startup is slow. The author openly calls the pack WIP with fast development, and the README asks for bug reports via GitHub Discussions - if a batch loader does something weird, that's the place to report it.
The usual traps
- Pattern that silently matches nothing - you get empty lists, no error. Check the pattern against
lsfirst. - Mixing file types in one pattern -
*.glband*.objin the same folder means a mixed batch; fine for analysis, messy if downstream nodes assume consistent topology. - Absolute vs relative patterns - absolute paths are the reliable default. Relative patterns resolve against the ComfyUI process's working directory, which is easier to get wrong than you'd think.
If you just want "everything in this one folder, alphabetically," the plain Load Mesh Batch node is simpler. This one earns its keep the moment your meshes live in nested project folders.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| glob_pattern | STRING | Glob pattern to match mesh files (e.g., /path/to/folder/*.glb) | |
| sort_byopt | COMBO | name | How to sort matched files |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| meshes | TRIMESH | — |
| textures | IMAGE | — |
| file_paths | STRING | — |