Commit Graph
29 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 2d0f70b1e5 Stage 6: Document::change() always refreshes derived data; ChangeType removed
change() now flushes drafts, re-syncs assets and shaders, rebuilds every label
list and the uid index, and commits. Document::ChangeType, the switch in
change(), the type parameter of edit_apply/edit_run/edit_push/assets_sync,
Window::changeType and every per-call change type (about 40 sites) are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:59:44 -04:00
shweetandClaude Opus 5.5 65a3546c3b Stage 4: one uid-based Selection for the timeline and animations list
- 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>
2026-10-03 15:46:47 -04:00
shweetandClaude Opus 5.5 700b613c62 Stage 3: operations layer (src/edit) and one undo entry point
- 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>
2026-10-03 15:26:53 -04:00
shweetandClaude Opus 5.5 a4638a422d Frame properties: one field table for change-all, shared widgets
- FRAME_CHANGE_SCALARS generates FrameChange fields, the frames_change apply step and change-all population
- Change-all draws component rows from tables instead of five widget lambdas and 46 aliases
- Frame properties uses one edit path (edit::COMPLETE), a vec2 field table and an X/Y flip loop
- Shared INTERPOLATION_LABELS and Document::layer_regions_get

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 13:44:14 -04:00
shweetandClaude Opus 5.5 3f31cedeed Slim Document: move data-model code out, unify edit plumbing
- Region generate/scan move to anm2/regions.cpp; both generators number from 1
- file_merge moves to anm2/merge.cpp and is table-driven
- MaxRects packer moves to util/pack
- Uniform config apply/trim/save move to resource/shader
- Snapshots push from their owned state; Document snapshot wrappers removed
- DocumentData base replaces the hand-written move constructor
- toast_log replaces 55 duplicated toast + English log pairs
- Apply repo .clang-format to touched files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 13:08:00 -04:00
shweet b7c24fad99 shading and shearing 2026-08-20 20:03:12 -04:00
shweet 5792dd25a2 Overlays, Shaders, Group Roots, Serialization Changes. Legalize Nuclear Bombs 2026-07-09 19:49:33 -04:00
shweet 6d206045c7 spritesheet editor fix, zoom levels 2026-06-20 22:27:11 -04:00
shweet 6e5d73c639 header cleanup 2026-05-22 10:20:43 -04:00
shweet 1bc5199e3b Holy vibecode Batman! 2026-05-21 21:00:57 -04:00
shweet d39a1dac3c miscellaneous sloppa fixes 2026-04-20 13:54:49 -04:00
shweet b60c4bc295 I N T E R P O L A T I O N 2026-04-14 14:28:14 -04:00
shweet 15f85b84a9 fixed crop/size/pivot issue when no region selected 2026-04-14 10:23:40 -04:00
shweet 0b91382f0f changes + more windows bs 2026-03-29 20:13:24 -04:00
shweet c11b404392 let's actually stage those changes... 2026-03-09 23:09:37 -04:00
shweet 1b7a49c25d regions and a whole bunch of other shit 2026-01-30 01:13:28 -05:00
shweet 8a1058d559 FLIPPING!!!!!!! 2026-01-13 19:00:56 -05:00
shweet 7f4e05a927 fixed event handling and a lot of ID stuff OOPS 2026-01-13 03:16:38 -05:00
shweet 5124f77817 random sound selection for triggers 2026-01-06 16:26:57 -05:00
shweet 119bbc4081 Refactor + render animation tweaks + updated frame properties + bug fixes 2025-12-17 23:02:00 -05:00
shweet 4cf5304c79 OH SHIT ROOT FRAME TINT/COLOR OFFSET! 2025-12-16 20:18:49 -05:00
shweet d34ff73512 CHANGES! 2025-12-13 20:12:52 -05:00
shweet 63c0ffe166 Fixed frame properties crash 2025-12-04 19:05:44 -05:00
shweet 300e322b9d Sound drag/drop 2025-11-30 22:25:57 -05:00
shweet 009b285baa tweak some variables here and there 2025-11-19 23:04:52 -05:00
shweet 9846a514ad Actually oops meant t add multiply/divide to here 2025-11-15 11:35:01 -05:00
shweet 07096c487b fuck git and fuck vs code 2025-11-11 11:25:46 -05:00
shweet 1e35910b0a Refactoring, FFmpeg updates 2025-11-03 00:16:05 -05:00
shweet 62cd94ca78 Big refactor, shuffling a lot of files around 2025-11-01 19:51:19 -04:00