|
30 | 30 | leaves ``context.active_object`` set to the target while |
31 | 31 | ``selected_objects`` is empty, so an ``if obj is None`` guard passes on a |
32 | 32 | selection that is gone. The scene state is then reset to no active object |
33 | | -and nothing selected, as before. ``--clear-active-on-deselect`` models the |
34 | | -wrong belief (deselect clears the active object) and exits 13. |
| 33 | +and nothing selected, as before. ``--clear-active-on-deselect`` is a |
| 34 | +self-check, not a falsifier: it clears the active object itself and shows |
| 35 | +that exit 13 reports it. No deselection Blender offers clears the active |
| 36 | +object (that is the contract), so the happy path is the witness: if Blender |
| 37 | +ever changed, the default run would exit 13 (#489). |
35 | 38 |
|
36 | 39 | By default it runs only the correctness check (no render) — the CI smoke |
37 | 40 | check. Pass --output to also render a still: |
38 | 41 |
|
39 | 42 | blender --background --python temp_override_join.py -- # check only |
40 | 43 | blender --background --python temp_override_join.py -- --no-override # must fail |
41 | | - blender --background --python temp_override_join.py -- --clear-active-on-deselect # 13 |
| 44 | + blender --background --python temp_override_join.py -- --clear-active-on-deselect # 13, self-check |
42 | 45 | blender --background --python temp_override_join.py -- --output j.png # + render |
43 | 46 | """ |
44 | 47 | import argparse |
@@ -380,7 +383,7 @@ def check_active_survives_deselect(objs, clear_active=False): |
380 | 383 | ob.select_set(True) |
381 | 384 | bpy.ops.object.select_all(action='DESELECT') |
382 | 385 | if clear_active: |
383 | | - view_layer.objects.active = None # the wrong mental model, made true |
| 386 | + view_layer.objects.active = None # self-check of the exit-13 report, not Blender |
384 | 387 | active = bpy.context.active_object |
385 | 388 | if active is None: |
386 | 389 | active_name = None # what the wrong mental model predicts |
@@ -566,7 +569,8 @@ def main(): |
566 | 569 | p.add_argument("--no-override", action="store_true", |
567 | 570 | help="join without temp_override (must fail)") |
568 | 571 | p.add_argument("--clear-active-on-deselect", action="store_true", |
569 | | - help="clear the active object after deselect-all (must fail, exit 13)") |
| 572 | + help="self-check: clear the active object after deselect-all " |
| 573 | + "and show exit 13 reports it (not a Blender falsifier)") |
570 | 574 | args = p.parse_args(argv) |
571 | 575 |
|
572 | 576 | bpy.ops.wm.read_factory_settings(use_empty=True) |
|
0 commit comments