Nodes/ComfyUI libigl/Load Mesh (Blender)
ComfyUI Node

Load Mesh (Blender)

Read .blend files without opening Blender

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Load Mesh (Blender)
    • mesh
    • info
    file_path

    Blender's .blend format is the one file type trimesh (the library that powers most of this pack) simply won't touch. It's a private binary format, undocumented in the way that would let third parties read it cleanly. So GeometryPack solves it the honest way: Load Mesh (Blender) just calls Blender itself. The node imports the .blend file through Blender's Python API (bpy), extracts the meshes, and hands them to the graph as a TRIMESH. No round-tripping through an exporter, no "open Blender and save as OBJ" step.

    It's part of ComfyUI-GeometryPack ("ComfyUI libigl") by Andrea Pozzetti, a pack that wraps Blender, CGAL, libigl, and VTK behind a graph-friendly interface. The trade-off for that access is a heavy install - see below.

    How it works

    The file_path input is a dropdown, not a free text field: the node scans ComfyUI/input/3d (recursively) and the input root for .blend files and lists what it finds. Pick one and it uses bpy.ops.wm.open_mainfile() to open the file, collects all objects of type MESH, and pulls each through the dependency graph - which means modifiers are evaluated before export, not applied destructively to your original file. The resulting mesh comes out as a single merged TRIMESH, and the info output is a STRING describing what was loaded (how many objects, vertex counts, that sort of thing).

    If you have a scene with one mesh object you'll get that object. If you have a scene with thirty, you get them merged into one - useful for a sculpture or a kitbashed assembly, less so if you needed the parts separated. For per-object extraction you'd still want to prep the file in Blender first.

    What this needs that other loaders don't

    The catch is right in the name: this is a Blender-backed node. It requires bpy, the Python bindings for Blender. GeometryPack's installer (comfy-env + pixi) provisions Blender into its isolated environment, so if you installed the pack normally it should just work - but it's the reason the first startup downloads so much, and the reason this node's import is "defensive": if bpy is broken on your setup, the node is skipped with a warning rather than taking the whole pack down.

    Installation is the pack standard:

    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
    

    or search "GeometryPack" in ComfyUI Manager. Restart ComfyUI after installing. Because of the experimental comfy-env installer and the Blender/CGAL/VTK dependency tree, the first launch is slow - that's normal, let it finish.

    Inputs, outputs, gotchas

    • file_path - dropdown of .blend files found under input/3d and input. Drop your file there and refresh.
    • mesh - the TRIMESH output, ready for the rest of the pack.
    • info - STRING report of what was extracted.

    The usual suspects for trouble: a .blend with only non-mesh data (curves, empties, armatures) yields an empty extraction, and heavily linked/instanced scenes may not materialize the way you expect. The author runs the pack as openly WIP with fast releases, so if Blender-backed loading misbehaves after an update, a clean reinstall beats an hour of head-scratching - and the README explicitly invites bug reports via GitHub Discussions.

    There are simpler loaders for OBJ/GLB/STL. Use this one specifically when the source of truth is a Blender file and you want to skip the export dance.

    Categorygeompack/io

    Inputs (1)

    NameTypeDefaultDescription
    file_pathCOMBO1 options: 3d/coca_cola.blend

    Outputs (2)

    NameTypeDescription
    meshTRIMESH
    infoSTRING