aboutsummaryrefslogtreecommitdiffstats
path: root/generat3d
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-28 12:27:04 +0100
committerDanilo M. <danix@danix.xyz>2026-10-28 12:27:04 +0100
commitba9e9e969de8b50fe4266cc27980666b3452db6d (patch)
tree798897de60cb659aec1461818a95cc0e010554cc /generat3d
parent89b1fb6f88ef2ea60f28623e04d46072ef15ba21 (diff)
downloadgenerat3D-ba9e9e969de8b50fe4266cc27980666b3452db6d.tar.gz
generat3D-ba9e9e969de8b50fe4266cc27980666b3452db6d.zip
Accept morphs parented to the figure's geometry
Genesis 9 morphs name the figure geometry (Genesis9.dsf#Genesis9-1) as parent, not the figure node. The node-only check dropped all of them: 737 morphs load now instead of 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'generat3d')
-rw-r--r--generat3d/scene.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/generat3d/scene.py b/generat3d/scene.py
index 5c35022..1917f28 100644
--- a/generat3d/scene.py
+++ b/generat3d/scene.py
@@ -162,6 +162,7 @@ class _Loader:
self.graph.add_prop(key(n["id"], n["id"], f"{ch}/{a}"), v)
for f in n.get("formulas", []):
self.pending.append((f, fpath))
+ self.owners = {asset["id"], geom.get("id")} - {None}
verts = np.array(geom["vertices"]["values"], dtype=float)
if verts.ndim != 2 or verts.shape[1] != 3 or not np.isfinite(verts).all():
raise Error(f"{fpath}: bad vertices")
@@ -195,7 +196,7 @@ class _Loader:
nverts = len(self.figure.verts)
for mod in doc.get("modifier_library", []):
parent = parse_url(mod.get("parent", ""))[2]
- if parent and parent != self.figure.id:
+ if parent and parent not in self.owners: # figure node or its geometry
continue
ch = mod.get("channel", {})
if ch.get("type", "float") not in ("float", "int"):