Commit Graph
460 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 2ce8795b4a Trigger sounds: overlap instead of cutting off, and play once per frame
- A sound can play over itself: each play uses a track that isn't busy
  (reusing finished ones), so close triggers no longer restart each other.
  Rendered audio mixes them the same way.
- The preview plays each frame's trigger sound once as playback reaches the
  frame, instead of on every tick spent in it, and no longer skips the
  sound of a frame passed over between ticks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:26:00 -04:00
shweetandClaude Opus 5.5 ef5796d667 Merging animations places triggers after the animation merged before them
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>
2026-10-06 02:03:20 -04:00
shweetandClaude Opus 5.5 a440af3c95 Change All Frame Properties: Depth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:24:05 -04:00
shweetandClaude Opus 5.5 f3fb7d5101 Layer frame depth: change a layer's draw order for part of an animation
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>
2026-10-06 01:21:50 -04:00
shweetandClaude Opus 5.5 94d0bbf206 Split works on every selected frame
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>
2026-10-06 00:51:48 -04:00
shweetandClaude Opus 5.5 f4fd255a02 CLI GIF/video rendering uses the editor's FFmpeg setting unless --ffmpeg is given
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:36:15 -04:00
shweetandClaude Opus 5.5 abb9f965d6 The CLI is a mode of anm2ed (anm2ed info|frame|render ...), not a separate binary
On Windows it attaches to the console it was started from, and gets UTF-8
arguments like the editor does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:34:36 -04:00
shweetandClaude Opus 5.5 2dbbfa5e86 anm2ed-cli and render tests: look at animations without the editor
- 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>
2026-10-05 13:32:42 -04:00
shweetandClaude Opus 5.5 356d74ebb6 Workshop description matches the README's features; README mentions detachable windows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:31:39 -04:00
shweetandClaude Opus 5.5 4d949827c8 Toasts: drop leftover blank line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:13:43 -04:00
shweetandClaude Opus 5.5 4856d9ba27 Detachable windows (Dear ImGui multi-viewports)
Settings > Display > Detachable Windows (on by default): any window can be
dragged outside the main window into its own OS window; the backend leaves
it off on Wayland. Detached windows are rendered after the main one, the
main window's close button still quits, window backgrounds are opaque, and
toasts anchor to the main window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:13:33 -04:00
shweetandClaude Opus 5.5 d53d176125 Define NOMINMAX on Windows so windows.h doesn't break std::max
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:02:26 -04:00
shweetandClaude Opus 5.5 dd898c2a0c Same-line Pivot Path/Only Selected Item and the save warning options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:48:46 -04:00
shweet 9ff05e389d agents... 2026-10-03 21:37:02 -04:00
shweetandClaude Opus 5.5 c09e8ca64e README: current features, build and tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:34:40 -04:00
shweetandClaude Opus 5.5 ce3b544392 Autosave edited spritesheets beside their files
With document autosave, spritesheets with unsaved pixel edits are written
to a hidden .<name>.png.autosave beside their PNG (only when changed since
their last autosave; a spritesheet edit alone also triggers the document
autosave). Restoring a document's autosave brings them back as unsaved
edits without touching the PNGs. The copies are removed when the
spritesheet is saved or reloaded, or the document's autosave is discarded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:28:02 -04:00
shweetandClaude Opus 5.5 ded95f436a Paste Property is one item; spritesheet reload every 3 s; Snapshots reads Undo/Redo
- Paste > Property pastes the property that was copied, enabled only when
  the clipboard holds one the selected frames can take.
- Auto spritesheet reload checks every 3 seconds (no interval setting); its
  Enabled checkbox no longer shares an ID with Autosave's.
- The Snapshots section in Configure is now Undo/Redo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:21:44 -04:00
shweetandClaude Opus 5.5 97be81b5c1 Timeline: cut, copy and paste one frame property
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>
2026-10-03 21:11:09 -04:00
shweetandClaude Opus 5.5 8fb28ef30a Isaac compatibility warning on save
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>
2026-10-03 21:05:57 -04:00
shweetandClaude Opus 5.5 251d04848a Timeline start/end markers
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>
2026-10-03 21:03:00 -04:00
shweetandClaude Opus 5.5 24af98a68e Onionskin: Pivot Path and Only Selected Item
Pivot Path draws, on the preview, the path each item's pivot travels:
a red point per frame joined by a red dashed line (Canvas::line_render,
on the dashed shader). Only Selected Item limits the onionskin samples
and pivot paths to the selected root, group root, layer or null. Paths
are cached until the document, animation or root-transform view changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:58:39 -04:00
shweetandClaude Opus 5.5 993957decf Auto spritesheet reload; operator symbols on Change All Frame Properties buttons
- Settings > File > Auto Spritesheet Reload (on by default, every 2 s):
  spritesheets whose files change on disk are reloaded as one undoable
  edit; ones with unsaved pixel edits are left alone, and the editor's own
  saves don't trigger a reload. Document::spritesheets_reload is shared
  with the Reload action.
- Change buttons read "= Adjust", "+ Add", "- Subtract", "× Multiply",
  "÷ Divide".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:55:05 -04:00
shweetandClaude Opus 5.5 d8ab5ff018 About: dancing characters rendered 1:1 and scaled up with nearest filtering
Framebuffer gains a filter setting (linear by default); the characters'
canvases use nearest so they stay pixelated at their larger size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:35:42 -04:00
shweet e713c15030 Revert "About: dancing characters at 1:1 size"
This reverts commit 3653295c8f.
2026-10-03 20:34:55 -04:00
shweetandClaude Opus 5.5 3653295c8f About: dancing characters at 1:1 size
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:33:00 -04:00
shweetandClaude Opus 5.5 5f40a789fe About: wider bars that reach the top, characters in the credits box, larger title
Bars are 3x wider and scaled to the loudest recent level, so loud parts
reach the top. The dancing characters stand in the box's bottom corners
inside the bars (sized as the original's robots were); the title row now
holds only the title, twice as large and shrunk to fit its width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:31:33 -04:00
shweetandClaude Opus 5.5 99a3744a31 About: credits roll after the original editor's About box
Recovered from IsaacAnimationEditor.exe (its About form and GDI+ paint
code): the credits scroll up a black box at 30 Hz, one effect per pass
(none, sway with trails, stretch to the music with trails while the title
flashes random colors, per-line sine wave), between left/right volume bars
that leave fading trails and shade from red into a color cycling with time.
The bars follow the music's loudness through a new audio::levels_get.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:25:44 -04:00
shweetandClaude Opus 5.5 2c4bee6330 Convert scales saved as multipliers to percents on load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:09:03 -04:00
shweetandClaude Opus 5.5 70abe366a0 Scales are saved as percents, clamped on load
UI Scale (50-200%) and render Scale (25-1000%) both step by 25%. Settings
saved as multipliers read as tiny percents and clamp to the minimum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:07:53 -04:00
shweetandClaude Opus 5.5 e6a374f571 UI Scale and render Scale are entered as percents
input_percent_range edits a multiplier setting as a percent, so saved
settings keep their meaning. UI Scale: 50-200% in 25% steps; render Scale:
10-1000%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:05:27 -04:00
shweetandClaude Opus 5.5 640bf0abeb Write XML, hashes and clipboard text straight from the model
The writer emits to a Sink instead of building an XmlNode tree: TEXT prints
as tinyxml2's XMLPrinter would, HASH folds the same elements into the FNV
hash, and TREE still builds nodes (for the FrameRestore backup). Unknown
children are interleaved at their read positions as elements stream out;
numbers skip escaping.

Corpus (1,251 files, Release): save 0.73 s -> 0.50 s, extended save
0.12 s -> 0.06 s, hash 0.13 s -> 0.05 s. Saves, hashes and clipboard text
are byte-identical to before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:00:51 -04:00
shweetandClaude Opus 5.5 210232eb83 Faster saving and hashing
- 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>
2026-10-03 19:43:56 -04:00
shweetandClaude Opus 5.5 c4b21fd90c Spritesheet pixel edits live in src/edit/spritesheets.cpp
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>
2026-10-03 19:06:20 -04:00
shweetandClaude Opus 5.5 4b6e186f57 Canvases handle input before rendering
Hover is tested against the canvas rectangle (is_canvas_hovered) before the
image is drawn, so pan, zoom, the region hover highlight and the checker
background follow the mouse in the same frame instead of one frame late.
The spritesheet editor's second hover/mouse computation is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:03:12 -04:00
shweetandClaude Opus 5.5 69e78ff77a Timeline: per-frame work runs once, not once per row
Escape, the context menu (and its shortcuts), frame resize drags and the
frame-move drop now run once from frames_child instead of inside every
row's child. draw() hands popups and global shortcuts to popups_update()
and shortcuts_update(). Drops a dead style push/pop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:01:40 -04:00
shweetandClaude Opus 5.5 146e5d4ff1 Fix close-popup ImGui stack imbalance, stale region hover, shared resize chord state, window properties leak
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:58:30 -04:00
shweetandClaude Opus 5.5 c04a685f18 Theme and ImGui helpers live in the imgui namespace, matching their files
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:47:42 -04:00
shweetandClaude Opus 5.5 901c11691b types.hpp is UI-free: theme moves to util/imgui/theme.hpp, ImGui conversions and dummy values to layout.hpp
The model and edit layers no longer include ImGui or localization headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:45:44 -04:00
shweetandClaude Opus 5.5 ab276f6f08 Move INTERPOLATION_LABELS out of the model into the frame properties wizard
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:42:50 -04:00
shweetandClaude Opus 5.5 36869918e5 Stage 10b: drop stale header includes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:38:30 -04:00
shweetandClaude Opus 5.5 4c569cb1e5 Stage 10a: delete dead code, merge tiny files, unify duplicated concepts
- 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>
2026-10-03 18:35:22 -04:00
shweetandClaude Opus 5.5 4d16f21541 Stage 9c: Recorder for renders; no settings override; spritesheet follows selection
- Recorder (imgui/window/recorder.*) owns a render: frame times, captured
  frames on disk, per-frame trigger sounds, and assembling PNGs, spritesheets
  (Image::paste) or ffmpeg output. Start, finish, cancel and failure share one
  stop path.
- Isolated and bounded renders no longer overwrite and restore Settings, pan,
  zoom and overlay: the preview draws with view values derived for the render.
- Image::region_get replaces the region export's own pixel copy.
- Selecting layer frames focuses their spritesheet (Document::frame_references_set)
  instead of the spritesheet editor forcing it every frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:15:06 -04:00
shweetandClaude Opus 5.5 39ccfb723a Stage 9b: animations draw from a model draw list
- 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>
2026-10-03 18:11:19 -04:00
shweetandClaude Opus 5.5 595658581f Stage 9a: shared canvas input, edit helpers and tool requirements
- CanvasInput gathers mouse, arrow keys (as a step vector), zoom and modifier
  state once; arrow nudges are one change per tool instead of four.
- frames_change_push/edit_begin_push/document_change_push replace each
  editor's own grouped frame-change command; rect_snap replaces three copies
  of grid-snap code.
- tool::INFO carries whether a tool needs a frame or a spritesheet;
  tool_cursor_update sets the cursor and the "why not" hint for both canvases.
- localize_format for localized format strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:08:57 -04:00
shweetandClaude Opus 5.5 c6c8e3598b Fix card lists: zero window padding for the list child, tooltips keep the window style
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:00:15 -04:00
shweetandClaude Opus 5.5 dc32483c45 Stage 8c: timeline cleanup
- One TimelineRow type for rows, row selection and drag payloads (replaces
  TimelineItemRow + TimelineRowReference).
- Frame/track selection helpers live on Document (frames_select, frame_select,
  frame_toggle, frames_range_select, frame_focus_select, focus_clear,
  track_select) instead of TimelineContext *_for(Document&) wrappers.
- Drop target and frame-move drag carry References; selection anchors are
  optionals; single-use helpers and write-only fields are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:55:14 -04:00
shweetandClaude Opus 5.5 6f7a457f8f Stage 8b: inline single-use timeline selection wrappers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:48:38 -04:00
shweetandClaude Opus 5.5 d08f59d7ba Stage 8a: panels as plain functions; content selection on the uid Selection
- 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>
2026-10-03 17:47:21 -04:00
shweetandClaude Opus 5.5 e50d76c784 Stage 7b: model/xml.cpp reads and writes tinyxml2 directly; Element tree removed
- 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>
2026-10-03 17:20:45 -04:00
shweetandClaude Opus 5.5 0b6f67d9bd Stage 7: typed model; Element tree is internal to model/xml.cpp
- 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>
2026-10-03 16:53:17 -04:00