From 70c366b5410e789bba347b4efc5161d5505ab3b3 Mon Sep 17 00:00:00 2001 From: soul Date: Mon, 19 Oct 2026 01:15:26 +0200 Subject: [PATCH] smoke_hull_source: update the view layer before comparing world positions around a refused Package matrix_world is stale after a location edit until the depsgraph runs, so the scene snapshot taken after moving Ship Root compared stale to fresh. Co-Authored-By: Claude Sonnet 5.5 --- tools/blender/tests/smoke_hull_source.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/blender/tests/smoke_hull_source.py b/tools/blender/tests/smoke_hull_source.py index e8020ec85..6385f4fae 100644 --- a/tools/blender/tests/smoke_hull_source.py +++ b/tools/blender/tests/smoke_hull_source.py @@ -274,6 +274,7 @@ def one_hull(scene, number, fixture, ship_id, extent, length, rows, body, palett off_centre = root.location.x root.location.x = off_centre + 1.7 # _frame_ship would put it back: a refusal that frames first is caught + bpy.context.view_layer.update() framed = {o.name: tuple(o.matrix_world.translation) for o in collection.all_objects} for label, expected, prepare, restore in ( ("no product", "The package has no product", lambda: None, lambda: None), @@ -288,6 +289,7 @@ def one_hull(scene, number, fixture, ship_id, extent, length, rows, body, palett rows_now = layout_rows(scene) result, message = run(bpy.ops.aetheria.package_ship) restore() + bpy.context.view_layer.update() report = scene.aetheria_package_report require(result == {"CANCELLED"} and expected in report, f"Package took a hull with {label}: {report!r} {message!r}") require(not (package / "ship.glb").exists(), f"Package wrote ship.glb for a hull with {label}")