27 Commits
Author SHA1 Message Date
PozzettiAndrea 19487d73b1 Remove save-preview route/button; batch preview passes TRIMESH through; add Get Mesh From Batch
- 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.
2026-08-14 13:51:37 +02:00
PozzettiAndrea ce11ca310d Fix save-mesh 405 (missing route) + Multi grid dims not matching inputs
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.
2026-08-14 13:47:14 +02:00
PozzettiAndrea 414f759791 Vendor frontend JS into javascript/; drop the prestartup copy dance
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.
2026-08-12 17:37:09 +02:00
PozzettiAndreaandClaude Opus 4.8 b5fb441e3e Load Mesh Batch: folder-path autocomplete via own /gpack/getpath route
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>
2026-06-16 14:58:36 +02:00
PozzettiAndrea 4bd4d43b80 updated to 2.61 2026-04-15 21:18:34 +02:00
PozzettiAndrea d131c99288 use logger 2026-02-23 23:44:25 +01:00
PozzettiAndrea 6595fb7fd6 fixed init 2026-02-13 01:20:40 +01:00
PozzettiAndrea 2f567210c9 dynamic widgets ver bump 2026-02-13 01:18:40 +01:00
PozzettiAndrea 948a2648ad cleanup of reamde 2026-02-13 01:15:40 +01:00
Andrea Pozzetti d8937c5e46 two venvs 2026-02-13 00:41:40 +01:00
Andrea Pozzetti b640379508 63 2026-02-13 00:37:40 +01:00
Andrea Pozzetti 481f2559f4 cleanup 2026-02-13 00:34:40 +01:00
Andrea Pozzetti c4689e743f cleanup 2026-02-13 00:19:40 +01:00
Andrea Pozzetti 8aedefdb21 massive overhaul 2026-02-12 23:14:40 +01:00
Andrea Pozzetti 7052f38495 removed cgal and bpy bridges 2026-02-12 23:00:40 +01:00
Andrea Pozzetti bc24e528d3 new init 2026-02-12 22:55:40 +01:00
Andrea Pozzetti 275c9cf96d full env isolation 2026-02-12 22:54:40 +01:00
Andrea Pozzetti 3315947a19 added prestartup_script css 2026-02-12 22:49:40 +01:00
Andrea Pozzetti 3ad38ccfb1 resolve paths 2026-02-12 22:36:40 +01:00
Andrea Pozzetti 6d899b755c added cgal bridge 2026-02-12 22:35:40 +01:00
Andrea Pozzetti 9e5c8f60a2 added pymeshfix 2026-02-12 21:59:40 +01:00
Andrea Pozzetti 4cbce1def8 version bump for pytest detection 2026-02-12 21:58:40 +01:00
Andrea Pozzetti f09cdd22d4 docs + cleanup 2026-02-12 21:18:40 +01:00
Andrea Pozzetti 71673eb9d3 updated viewer 2025-11-14 21:46:06 +01:00
Andrea Pozzetti 5d902c31d4 testing 2025-11-14 21:43:06 +01:00
Andrea Pozzetti 397a75582b progress 2025-11-14 21:41:06 +01:00
Andrea Pozzetti c49d9711e5 first draft 2025-11-14 21:38:06 +01:00