Every content window's Remove (the Delete key) takes the selection out with
what refers to it: a layer's or null's tracks in every animation, a
spritesheet's plain layers (and regions), an event or sound from its triggers
(dropping triggers left with neither), a shader or region from its frames
(which keep the region's rectangle), and a library's layers, flattened into
plain ones. When anything is in use it asks first, listing what goes ("This
will remove:" ... "Are you sure?"). Remove Unused is gone; Remove takes its
place in each footer.
One reference walk (model.cpp) counts uses and finds unused items, so
shaders on null and root frames count, and an animation layer's unused
spritesheet doesn't. Flattening can be limited to some layers, merging only
their children's triggers, which now record the layer they fired through.
edit::content_remove does the removal; Document::spritesheet_path_resolver_get
is shared with saving.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Events are plain again: no built-in names offered, locked or listed in the
Events window, and the game's copy of a trigger keeps its first event. The
list rows' rename lock and event_id_resolve go with them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A trigger holds a list of events (Frame Properties lists them like sounds);
the first stays its EventId, the rest are <Event Id> children in the
editor's copy, and the Isaac warning counts the dropped ones. In extended
documents, stop and done are offered as built-in events: listed in italics
at the top of Events, locked from renaming, and added to the file when a
trigger first uses one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blur is a layer frame's box blur, as Flash's low-quality BlurFilter: a box that many canvas pixels wide, averaged
over the frame's crop (premultiplied) by the texture shader, the quad grown by its reach. An animation layer blurs
its child's draws at least as much. It interpolates, copies, batches (clamped to 0-255), saves as an editor-only
Blur attribute and counts as an Isaac issue.
Change All Frame Properties gains the Child section (animation, mode, start frame, random, restart), applied only
to animation layers and disabled when no animation layer is targeted. Frame Properties' Flip X/Y sit below Visible
instead of inside Child.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Libraries window (docked with Spritesheets and Sounds) links other .anm2
files: cards list each one's animations, open it as a tab, and reload when
it changes on disk. A layer's Source is a spritesheet or an animation, from
this file or a library; the preview, renders and CLI draw the child in the
layer's frame. Animation-layer keyframes set the child's animation, mode
(loop, once, hold), start frame (or random) and restart; Child is also a
copyable frame property. All of it is editor-only and counted by the Isaac
warning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- src/model: typed Model (Info, Content, nested TrackGroup/AnimationGroup,
copy-on-write shared animations, Extras/XmlNode passthrough for unknown XML,
layout vectors so saves stay byte-identical).
- src/edit, Document, Selection, Snapshots, every window, the timeline, wizards
and popups now read and edit model::Model; no UI code touches Element.
- anm2/ is reduced to the XML reader/writer/normalizer behind model/xml.cpp;
dead Element operations (merge, regions, item_add, rect, frame helpers,
element_get/unused, deserialize) are deleted.
- Goldens, invariants, undo walk and the local corpus (1,251 files) match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- src/edit/ (in anm2ed_core): frame, track, animation, region, grid and
change-all edits as plain functions of the model. Each returns the uids of what
it created for the UI to select; copies get fresh uids.
- Document::edit_apply snapshots, runs an operation and commits; edit_begin
starts drag edits. window_edit, edit_command_push, snapshot_command_push,
SnapshotKind and the tracks/frames/regions/textures snapshot kinds are gone;
Snapshots has a single push(message, isTextures).
- Timeline, animations, regions, shaders, items, wizards, taskbar and file merge
call the edit layer; they keep only selection, scrolling and toasts.
- Snapshots, Storage, Playback and ImGui core build into anm2ed_core, so undo is
testable: tests/undo.cpp runs a seeded random walk of edits per fixture and
checks every undo/redo state by hash, plus selection follow through undo.
- types::edit renamed types::edit_state (clashed with the edit namespace).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>