From f4e229551486d46caf7c697cab0d829839b63ade Mon Sep 17 00:00:00 2001 From: Andrea Pozzetti Date: Thu, 12 Feb 2026 21:57:40 +0100 Subject: [PATCH] version bump, viewer defaults to none for fields --- pyproject.toml | 2 +- web/js/viewer/features/FieldVisualization.js | 7 +++++++ web/viewer_vtk.html | 6 ++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 309b6890..b8981883 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-geometrypack" description = "CGAL - Blender - IGL - Paraview - VTK. Geometry processing nodes for ComfyUI - mesh manipulation, remeshing, hole filling, UV unwrapping, and 3D visualization" -version = "0.1.6" +version = "0.1.7" license = { text = "GPL-3.0-or-later" } classifiers = [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", diff --git a/web/js/viewer/features/FieldVisualization.js b/web/js/viewer/features/FieldVisualization.js index 15aa8cf2..7968a2d5 100644 --- a/web/js/viewer/features/FieldVisualization.js +++ b/web/js/viewer/features/FieldVisualization.js @@ -52,6 +52,9 @@ export class FieldVisualization { return { pointFields: [], cellFields: [], allFields: [] }; } + // Fields to hide from dropdown (VTK internal arrays that aren't useful to visualize) + const HIDDEN_FIELDS = ['Attribute', 'vtkOriginalPointIds', 'vtkOriginalCellIds']; + const pointData = polyData.getPointData(); const cellData = polyData.getCellData(); @@ -62,6 +65,8 @@ export class FieldVisualization { for (let i = 0; i < pointData.getNumberOfArrays(); i++) { const array = pointData.getArray(i); const name = array.getName(); + // Skip hidden/internal fields + if (HIDDEN_FIELDS.includes(name)) continue; const range = array.getRange(); pointFields.push({ name, @@ -77,6 +82,8 @@ export class FieldVisualization { for (let i = 0; i < cellData.getNumberOfArrays(); i++) { const array = cellData.getArray(i); const name = array.getName(); + // Skip hidden/internal fields + if (HIDDEN_FIELDS.includes(name)) continue; const range = array.getRange(); cellFields.push({ name, diff --git a/web/viewer_vtk.html b/web/viewer_vtk.html index c74eb5a5..86be9a31 100644 --- a/web/viewer_vtk.html +++ b/web/viewer_vtk.html @@ -363,10 +363,8 @@ colormapLabel.style.display = 'flex'; - // Auto-select first field - if (fieldInfo.allFields.length > 0) { - fieldSelector.value = fieldInfo.allFields[0].fullName; - } + // Default to "None" - don't auto-select any field + // fieldSelector.value stays as "" (None option) } else { fieldLabel.style.display = 'none'; colormapLabel.style.display = 'none';