Deleting an object in a container tab only cleared references inside
the template. Placements in scenes and other containers kept their
instance edit and showed "(missing)" in the inspector.
- shownObjectIds records which objects every holder shows before the
delete. dropReferencesToGone compares that with the state after it
and clears each reference that no longer resolves.
- A reference is resolved from its own place with referenceCandidates,
the same way the runtime does. One rule covers instance edits,
nested placements and full ids like p~crate.
- A cleared instance edit is dropped when it now says the same as the
template's own value. Without such a value a marked None stays, as
if picked by hand, and Reset hands the row back to the template.
- All cleared references come back with a single undo.
- References that were already dead in saved projects stay untouched.
Findings, not fixed here:
- A reference from container D into a nested placement q is stored as
q~<id>, but the copy is named r~q/<id> in every placement of D. The
runtime finds nothing, so that reference is dead from the start.
- Delete asset removes placed objects by cascade but does not clear
references to them.
Tests:
- Unit object-references: 17 passed (13 + 4)
- Gate: 198 files, 2873 tests, exit 0
- e2e 1-17,57: 564 checks passed, 57 has 13 (+1 for 57h)
- Five unit counter-probes and one browser counter-probe fail as
expected
- e2e total 1607 is computed, not measured in a full run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>