| … | … | @@ -19,6 +19,8 @@ extends Node |
| 19 | 19 | ## 8. OUTLINER (user 2026-10-05 "the diamond icon next to every parametric shape |
| 20 | 20 | ## group"): a shape's group row reads "◇ <Type>", and clicking it selects the |
| 21 | 21 | ## SHAPE (the Shape panel follows), not merely its pieces |
| 22 | ## 9. G THROUGH MoveOperator on a ONE-piece shape (every new box): shape.xform, the frame |
| 23 | ## moves — its one-brush path once wrote brush.translate on the generated piece |
| 22 | 24 | ## |
| 23 | 25 | ## RUN AS A SCENE: "$HYPER_TPS_GODOT" --headless res://scenes/test/gate_shape_editor.tscn |
| 24 | 26 | |
| … | … | @@ -246,3 +248,27 @@ func _run(map: Node3D) -> void: |
| 246 | 248 | String(map.selected_shape()) == dot, map.selected_shape()) |
| 247 | 249 | _ok("8. ... so the Shape panel edits it", panel != null and panel.call("shown_dot") == dot, |
| 248 | 250 | panel.call("shown_dot") if panel != null else null) |
| 251 | |
| 252 | # ---- 9. G THROUGH THE OPERATOR on a ONE-piece shape (every new box) ---- |
| 253 | # The single-brush path of MoveOperator.confirm journalled brush.translate on the |
| 254 | # generated piece: the frame stayed, and the next regeneration lost the move. |
| 255 | persist.begin_gesture("box") |
| 256 | var box9: String = persist.record("shape.create", {"type": "box", "gv": 1, "params": {}, |
| 257 | "frame": SceneObjects.xform_to(Transform3D(Basis.IDENTITY, Vector3(30, 0, 30))), "size": [2, 2, 2], |
| 258 | "material_id": 2, "level_id": 0}) |
| 259 | persist.end_gesture() |
| 260 | persist.refold() |
| 261 | map.select_shape(box9) |
| 262 | var one: int = (map.get("_sel_brushes") as Array).size() |
| 263 | var bf0: Transform3D = persist.shape_state(box9)["frame"] |
| 264 | var seq9: int = persist.records().reduce(func(m: int, r: Dictionary) -> int: return maxi(m, int(r["seq"])), 0) |
| 265 | var stk: Node = map.call("_ensure_ops") |
| 266 | var mv: Object = map.get("_move") |
| 267 | var on: bool = stk.activate(mv) |
| 268 | mv.set_tool_setting("distance", 3) |
| 269 | mv.update_preview() |
| 270 | mv.set_tool_setting("move", true) |
| 271 | persist.refold() |
| 272 | _ok("9. G (MoveOperator) on a ONE-piece shape writes shape.xform, never brush.translate", |
| 273 | one == 1 and on and _kinds(persist, seq9) == ["shape.xform"], [one, _kinds(persist, seq9)]) |
| 274 | _ok("9. ... and the shape's frame moved", not (persist.shape_state(box9)["frame"] as Transform3D).origin.is_equal_approx(bf0.origin)) |