From ba9e9e969de8b50fe4266cc27980666b3452db6d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 28 Oct 2026 12:27:04 +0100 Subject: 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 --- tests/test_scene.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_scene.py') diff --git a/tests/test_scene.py b/tests/test_scene.py index 812ea60..c9fbcf4 100644 --- a/tests/test_scene.py +++ b/tests/test_scene.py @@ -189,6 +189,13 @@ class SceneTest(unittest.TestCase): scene, _ = load_quiet(DATA / "scene.duf", [root]) self.assertNotIn("Fig:Tools?value", scene.graph.props) + def test_morph_parented_to_geometry(self): + m = self.mod("Geo", {"vertex_count": 3, "deltas": {"values": [[2, 0, 0, 1]]}}) + m["parent"] = "/data/Test/Fig/Fig.dsf#Fig-geom" + root = self.root(self.MORPHS + "Geo.dsf", self.morph_doc(m)) + scene, _ = load_quiet(DATA / "scene.duf", [root]) + self.assertIn("Fig:Geo?value", scene.figure.morphs) + def test_other_geometry_warning_once(self): other = {"vertex_count": 99, "deltas": {"values": [[0, 1, 0, 0]]}} root = self.root(self.MORPHS + "Other.dsf", self.morph_doc( -- cgit v1.2.3