From 89b1fb6f88ef2ea60f28623e04d46072ef15ba21 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 28 Oct 2026 12:25:51 +0100 Subject: Skip non-numeric morph channels, summarize other-geometry morphs Genesis 9 Starter Essentials ships file-launcher channels (type "file") in its Morphs folder and morphs whose vertex count belongs to other geometry. The first made loading fatal, the second printed one warning per morph. Co-Authored-By: Claude Opus 5.5 --- generat3d/scene.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'generat3d') diff --git a/generat3d/scene.py b/generat3d/scene.py index 722057f..5c35022 100644 --- a/generat3d/scene.py +++ b/generat3d/scene.py @@ -102,6 +102,7 @@ class _Loader: self.graph = Graph() self.loaded = set() self.hd = 0 + self.other_geometry = 0 def run(self): nodes = self.doc.get("scene", {}).get("nodes", []) @@ -138,6 +139,8 @@ class _Loader: warn("pose in scene ignored: the .dbz holds rest data") if self.hd: warn(f"{self.hd} HD morphs: detail ignored (v1)") + if self.other_geometry: + warn(f"{self.other_geometry} morphs for other geometry skipped") return Scene(self.path, self.figure, self.graph) def _figure(self, inst, fpath, asset): @@ -195,6 +198,8 @@ class _Loader: if parent and parent != self.figure.id: continue ch = mod.get("channel", {}) + if ch.get("type", "float") not in ("float", "int"): + continue # file launchers, aliases on bones: not dials for name in ("value", "min", "max"): if name in ch and not _finite(ch[name]): raise Error(f"{path}#{mod['id']}: {name} is not a finite number") @@ -207,7 +212,7 @@ class _Loader: self.hd += 1 d = morph.get("deltas", {}).get("values", []) if morph.get("vertex_count", nverts) != nverts: - warn(f"{path}#{mod['id']}: vertex count mismatch, morph skipped") + self.other_geometry += 1 elif d: arr = np.array(d, dtype=float) if (arr.ndim != 2 or arr.shape[1] != 4 -- cgit v1.2.3