- Drop /gpack/save_preview and the VTK viewer's "Save Mesh" button (added one
commit ago): previews are temp exports, and persisting a mesh is what the
SaveMesh nodes are for. The textured viewer's "Save GLB" stays -- it is a
pure client-side download, no route.
- Preview Mesh Batch (VTK) now outputs the TRIMESH batch (is_output_list),
same passthrough pattern as Preview Mesh Multi, so it can sit mid-graph.
- New GeomPackGetMeshFromBatch (nodes/io/get_mesh_from_batch.py): extract one
mesh from a TRIMESH batch by index (clamped), logging the source file_name
when present. Registered in nodes/io/__init__.py.
Save mesh: the VTK viewer's Save button POSTed to /geometrypack/save_preview,
a route that was never ported into GeometryPack (inherited caller from
comfy-3d-viewers; only /gpack/getpath existed). ComfyUI's GET catch-all
matched the path, hence 405 instead of 404. Added POST /gpack/save_preview in
__init__.py next to getpath: basename()-sanitized lookup of the temp preview
export in ComfyUI output/ (tempdir fallback), copied to output/saved_<name>;
returns {success, saved_filename}. Viewer fetch updated to the new path.
Multi cols/rows: entering dims whose product was smaller than the mesh count
(e.g. 1x1 for 2 meshes) overflowed viewports into IMPLICIT CSS grid rows
(auto height), so the rendered layout stopped matching the inputs. Now the
edited field is authoritative and the other dimension auto-raises to fit
(ceil(n/edited)); both inputs are updated to show the grid actually in
effect. Oversized grids (empty cells) remain allowed.
The viewer JS/HTML/bundles are now committed in javascript/ (declared via
pyproject [tool.comfy] web = "javascript") instead of being copied from the
shared comfy-3d-viewers pip package at prestartup. Consequences:
- requirements.txt is now just comfy-env (host env installs nothing else,
per the never-touch-the-host-env principle)
- prestartup_script.py no longer copies viewers or web_src; it keeps only
setup_env() and the input-asset copies
- WEB_DIRECTORY attribute removed; the pyproject declaration is the single
source (served at /extensions/comfyui-geometrypack/, keyed by project name)
- web_src/ deleted; its 6 widgets now live in javascript/js/ as the tracked
source, edited directly
- viewer_pbr.html hardcoded-fallback URL updated to the new mount name
Iframe URLs auto-detect the mount from import.meta.url, so the folder rename
and mount-name change are transparent at runtime.
Inspired by VHS Load Video (Path), but GeometryPack-owned: register
/gpack/getpath in __init__ (main process, after PromptServer exists) to
list directory contents, and a web_src widget that replaces folder_path
with an <input>+<datalist> showing live FOLDER suggestions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>