Saves leave out tint channels of 255 and color offsets of 0, which Isaac and
the editor read as those defaults, in both the game's copy and the editor's.
The option sits beside Extended Format in Configure's Serialization row; the
manager takes it with the other settings (chords_set is now settings_apply).
Also drops layer_child_transform_get's unused model parameter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flattening adds the events animation layers' children fire to the
animation's triggers on those frames (events matched by name, added when
missing). Extended documents now write ExtendedVersion="2", for files that
may hold libraries, animation layers, child playback, several events per
trigger, alpha offsets and blur.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An animation layer's row shows a folder; opening it lists its child's tracks
underneath, greyed and read only, with each keyframe drawn where the parent
reaches it. Double-clicking the row (or a child row) steps into the child:
its animation in this tab, or its library's tab (opened if need be), at the
time the parent plays it. A breadcrumb above the timeline leads back out, and
the preview draws the parent around the child, dimmed and frozen where it was
stepped in from.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Rebirth document's game copy turns each animation layer into plain layers,
one per layer its child draws, baked a frame at a time (runs of identical
frames merged; skew dropped), adding library spritesheets at paths relative to
the document; the editor's copy is unchanged and the Isaac warning says so.
Layers whose animation isn't in its file are drawn red in the Layers window
(nothing is said while a library hasn't loaded). Onionskin pivot paths are
redrawn when a library loads or reloads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playback, renders and the preview's event label include the triggers of
child animations (from this file or a library) as each child reaches them;
libraries' sounds load with them, and a frame can mix several sounds. The
reload setting is now Auto Resource Reload and covers libraries too.
Animation layers are labeled by their animation (not a spritesheet) in the
timeline and Item Properties as well as the Layers window.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drawing or erasing on an SVG spritesheet shows why it can't be edited (and
no longer leaves an empty undo step). Saving a Rebirth document whose layers
show SVG spritesheets first offers to convert them into PNGs beside them
(one undoable edit); keeping them counts them in the Isaac warning. The
game's copy of a trigger keeps its first event that isn't stop or done, and
only further custom events count as dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An .svg spritesheet loads through lunasvg (now part of the core library) at
one pixel per SVG unit, so regions, crops and picking work as for PNGs. The
preview, renders and CLI draw it again, cached per power-of-two zoom level up
to 8x, so it stays sharp when zoomed or scaled. Its pixels aren't edited
(pencil, eraser, pack and merge leave it alone, and Save skips it), and the
Isaac warning counts SVG sheets since the game can't load 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>
Color Offset gains an alpha channel (Frame Properties, Change All, property
copy, interpolation and root folding), drawn by adding it to the texel's
alpha. Saved as AlphaOffset in the editor's copy only and counted by the
Isaac warning.
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>
New layers added from the timeline can play an animation too: both popups
draw the source with layer_source_draw and build the item from the same
ItemEdit, and edit::item_add takes the new layer or null whole.
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>
A document remembers whether it saves as the editor's document alone (marked
with ExtendedVersion on Info) or as Rebirth's document with the editor's copy
embedded. Detected on open; File > Extended Format toggles it (undoable). The
setting is now the default for new files, and the Isaac compatibility warning
only applies to Rebirth documents.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The property, tool, settings, strings and saved attribute are now Skew
(SkewX/SkewY in the editor's copy). Files with ShearX/ShearY still load,
and settings saved under the old names carry over. Goldens differ only in
the attribute name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Appending moves the appended animation's triggers by the length merged so
far; prepending moves the target's triggers by the prepended length.
Replace and ignore keep trigger times. Goldens for prepend merges updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layer frames get an editor-only Depth (Frame Properties, property
copy/paste): +N draws that layer N layers above its place in the timeline
for that frame, -N below; stepped, not interpolated. The draw list orders
layers by it (preview, renders, CLI). Saved as Depth in the editor's copy
only; the Isaac Compatibility Warning and anm2ed info count frames using it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split (menu and shortcut) splits each selected frame that spans the time
under the cursor or playhead; triggers are skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- anm2ed-cli info|frame|render: a text summary, one frame as a PNG, or the
whole animation as a contact sheet, PNG sequence, GIF or video, drawn by
the editor's OpenGL renderer in a hidden window (render::HeadlessGL).
- render::animation_frame_render / animation_record draw an animation's
layers over its bounds (Canvas::layers_render, also used by About) and
record them through the existing Recorder.
- The editor's code builds as anm2ed_app, shared by the editor, the CLI and
anm2ed_render_tests, which checks a fixture's pixels and golden PNGs
(with tolerance; skipped without OpenGL) and leaves its renders in
build/renders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the frames context menu, Cut/Copy/Paste each open onto Frame (the whole
frame, as Ctrl+X/C/V) or Property, which lists the properties the frame
type has. Copying a property copies the focused (or first selected) frame;
pasting sets just that property on the selected frames, and is disabled
when a target lacks it or what it refers to (region on the target's
spritesheet, shader, event, sounds). Cutting resets it to the default.
Actions gained submenus; edit::frames_property_set does the work (tested).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > File > Isaac Compatibility Warning (on by default): saving in
the Isaac format first lists what the game's copy can't keep as it is -
eased frames (baked into one-frame steps), group transforms (baked into
their items), shear and shaders (dropped), trigger sounds (dropped) - with
Save Anyway / Cancel. model::isaac_issues_get counts them (tested on the
fixtures).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Right-clicking the numbered row offers Add Start/End Marker Here and
Remove Markers; Shift+Comma / Shift+Period (configurable) set them at the
playhead. Markers are faded playheads, with the numbers outside their
range darkened, and playback loops within them. They are saved as
StartMarker/EndMarker on the editor's copy (SourceDocument) only, as one
undoable edit each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- XML text is printed straight from the node tree by a Printer that matches
tinyxml2's XMLPrinter byte for byte; no tinyxml2 document is built to save.
- Numbers format with std::to_chars (whole numbers as integers) instead of
snprintf, with the same text as "%.8g".
- Frame attribute and track child vectors are reserved up front.
- Repeated attributes in a read file collapse as tinyxml2 wrote them.
Corpus (1,251 files, Release): save 4.2 s -> 0.77 s, extended save 0.61 s ->
0.12 s, hash 0.28 s -> 0.13 s; every output is byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
regions_trim, spritesheet_pack and spritesheets_merge are model functions that
take the source image(s) and return the new image; Document keeps thin
wrappers that store the result as an asset. The edits are now tested
headless (trim, pack, merge with layer remap).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Dead code: util/map, util/unordered_map, unused vector/math/string/input
helpers, Document getters, special-interpolation bake leftovers,
triggers_sort, SnapshotStack::max_size_get, AudioStream capture API.
- Merges: util/xml, util/string, resource/strings.cpp inlined; constants
into input.hpp; tooltip into layout; Recorder into render; onionskin,
tools, welcome and frame properties are panel functions; timeline
popups.cpp folded into timeline.cpp.
- util/origin.hpp replaced by model Origin (the merge setting stays a
combo index, so saved preferences keep their meaning).
- Item type names/icons/colors moved from model/common.hpp to the
timeline header; the model no longer includes icon/strings headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- model::animation_draws_get returns what an animation draws at a time (root,
group roots, layers, nulls; onion-skin samples first), with root and group
root transforms as each item's parent and their tint/offset folded into
layer frames.
- The preview, the About friends and animation_rect all use it; the
preview's render lambda shrinks to drawing the list.
- Tests for draw order and root folding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New panel kit (imgui/window/panel.*): list/card drawing with multi-select,
rename, arrow keys, drag hooks and tooltips; a list panel helper for the
context menu, shortcuts and footer; panels build their Actions inline.
- Layers, nulls, events, sounds, spritesheets, regions, shaders and
animations are plain functions over a small persistent state struct.
- Content items are selected by uid in the shared Selection (one kind per
content type, plus a focus per kind); regions are those of the focused
spritesheet. Selection survives undo, paste and removal like the timeline's.
- Combo labels are computed when drawn (Document::choices_get).
- Deletes the Window callback framework, WINDOW_FLAGS, Storage and the
per-window selection snapshot fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Reading goes from tinyxml2 straight into the typed model, including legacy
layouts (flat GroupId groups, *AnimationGroups with Index, FrameRestore
backups, baked frames, SoundId, Overlay) and load-time id/region repair.
- Writing builds an XmlNode tree from the typed model for a set of flags:
id renumbering, region sync, group-root and interpolation baking happen on
typed data; groups are nested or extracted the way the old pipeline did.
- Unknown XML is kept verbatim (XmlNode) instead of being re-emitted through
the Element writer.
- model_hash is an FNV hash of the editor-format node tree (what a save would
write); the per-fixture hash goldens are gone.
- Deletes src/anm2 (Element, normalize, groups, hash, xml) and the unused
util/xml attribute helpers and ElementType/ItemType table columns.
- All goldens, invariants and the local corpus are byte-identical.
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>
- resource::AssetStore (core) keeps immutable images and sounds keyed by content
hash for the life of the document; nothing is purged until it closes.
- Undo state holds spritesheet/sound id -> asset key maps (always tracked), so
every edit can undo texture changes; the textures-only snapshot flag
(edit_begin(label, true) / push(message, isTextures)) and the pixel/audio
equality helpers are gone.
- Document::texture_get/sound_get read through the store; texture_set/sound_set
add assets; texture_edit gives the pencil a private draft that becomes a new
asset on the next change().
- Spritesheet dirty state compares path + asset key instead of hashing pixels.
- Preview audio reads sounds through the store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Selection { map<kind, set<uid>> uids; Handle focus; } (src/selection.*, core)
replaces Document::reference, the frames/items/animation Storages,
groupReferences, and the timeline's selection snapshot/lock/focus state.
- Because selection is by uid it follows elements through edits by itself;
after an edit or undo, selection_follow only drops removed uids and moves a
removed focus to its nearest survivor. The Stage 2 handle capture/re-resolve,
frames_reference_normalize_for, frames_selection_sync_for and the index-based
frame validity repair are gone.
- Document keeps a UidIndex (rebuilt on every change) and exposes
reference_get/reference_set, selected_get/selected_set(kind),
frame_references_get/set and animations_selected_get/set.
- UidIndex records each uid's element type.
- The animations list keeps its ImGui multi-select Storage as a per-frame mirror
of the Selection; content windows are unchanged until Stage 8.
- tests/selection.cpp and tests/undo.cpp cover selection through inserts,
reverses, deletes, item and animation removal, regrouping and undo.
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>
- Element::uid: runtime-only, unique per document (uids_repair on load and after
every edit gives copies and new elements fresh uids; never serialized or hashed)
- Handle {animation, item, frame} uids and UidIndex (one walk: uid -> Reference)
- Snapshots capture the selection's handles when an edit starts and re-resolve the
fields the edit left untouched on commit, undo and redo; replaces
restored_snapshot_sanitize. Covers the main reference, frame/item/group
references, timeline frame selection and the animation list selection.
- tests/selection.cpp: references survive inserts, copies, deletes, animation
removal/reordering and regrouping
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- resource::Image (pixels, size, uid) replaces Texture in documents, undo and
wizards; it lives in anm2ed_core with no GL. uid changes with the pixels.
- resource::texture::id_get uploads lazily and evicts textures not drawn in a frame
- resource::AudioData (bytes, uid) replaces Audio; resource::audio::play/stop/
track_detach/is_playing cache decoded audio and tracks per uid
- Resources::icon_id_get shortens the icon call sites
- tests/assets.cpp covers Image png round trip, uid tracking, merge_append
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Duplicate ids in any content list (spritesheets, shaders, layers, nulls, events,
sounds, regions) are repaired at load: the first holder keeps the id, so tracks
stay bound to the item they referenced (previously remapped to the wrong layer)
- Unknown attributes and element text survive save; retired BakeCount/OriginalDelay
are still dropped. Private corpus (1,251 files) output unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- anm2ed_core static library (anm2 + non-UI util + log) shared by app and tests
- Logger is inert until session_open, so the core has no SDL dependency
- doctest suite: golden round-trips of 12 synthetic fixtures across every
serialization preset, format and merge type; save/reload invariants
(fixed point, hash stability, game view equals re-baked game view);
operation goldens; env-gated private corpus run (ANM2ED_CORPUS)
- ANM2ED_UPDATE_GOLDEN=1 regenerates goldens; tests/MANUAL.md UI checklist
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>