Commit Graph

560 Commits

Author SHA1 Message Date
bflatastic 9929b5f9ac M5.10: keyframes behave like After Effects: drags never destroy keys, stretched layers, Shift/Ctrl/Ctrl+Alt clicks, locked layers, Hold off
- A drag (keys.move steps sharing a merge key) applies its total offset to the keys as they
  were before it (`Session::key_move`, `prop::shift_keys`): dragging over another key of the
  property no longer deletes it; only the drop position replaces a key, as in After Effects.
- Keys of time-stretched layers move with the pointer: offsets are applied in comp time and
  snapped to comp frames (drags and Alt+Arrow nudges; they moved by the layer-time distance).
- Shift+click toggles a key in or out of the selection (`keys.select {toggle}`); Ctrl+click
  switches Linear ↔ Auto Bezier and Ctrl+Alt+click toggles Hold.
- Keys of locked layers can't be selected (clicks, marquee, Select All Keyframes), so nothing
  edits them.
- Toggle Hold off returns an eased key to Bezier (it always restored Linear).
- Shift-dragging a key snaps to everything the current time snaps to — other keys, layer in /
  out points, layer and comp markers, the work area — and a tooltip shows the key's time and how
  many frames it moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:40:42 +07:00
bflatastic 3b6b390f68 M12.8: read the system memory every 30 s instead of 10 s
Each reading starts PowerShell on Windows (in the background since the previous commit); the
cache budgets only need to follow memory pressure, not track it closely.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:25:01 +07:00
bflatastic e3778b1afd M3.15: Ctrl+C / Ctrl+X / Ctrl+V reach Edit ▸ Copy, Cut and Paste in the real app
The windowing layer delivers Ctrl+C, Ctrl+X and Ctrl+V as clipboard events instead of key
presses, and the shortcut dispatcher only read key presses: in the app, copying and pasting
keyframes, layers and effects with the keyboard did nothing (tests passed because they inject
key presses). Clipboard events now map back to their keys with the modifiers held (so Ctrl+Alt+C
and the other variants work too), except while text is edited in the viewer, which handles them
itself. Ctrl+V sends no event while the system clipboard is empty, so copying now also puts a
line naming what was copied on it ("EffectCraft: 3 keyframes").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:15:22 +07:00
bflatastic f3db1ebe38 M5.9: keyframe drags in the Timeline follow the pointer to the end; Shift snaps
Dragging a keyframe moved it a frame or two and then let go: the key's widget id includes its
time, so after the first move it was a new widget and egui ended the drag. The Timeline now
follows the whole gesture itself (`KeyDrag`: from where the button went down, by whole frames,
every selected key, one undo step), like After Effects. Holding Shift snaps the grabbed key to
the current time, the work area and composition markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:14:02 +07:00
bflatastic 2d4a0902ea M12.8: the app no longer freezes every 10 s on Windows: the system memory is read in the background
Every 10 seconds the UI thread re-read the system's memory for the cache budgets, and on
Windows that starts PowerShell (`Get-CimInstance Win32_OperatingSystem`) and waits for it:
about a second, sometimes two, during which the whole app froze. The reading now runs on a
background thread (`sysinfo::MemoryWatch`); `Session::memory_tick` takes the last reading and
starts the next one, never waiting. Console programs started for it no longer open a console
window (`CREATE_NO_WINDOW`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:05:17 +07:00
BFlat 4b37443481
Merge pull request #39 from storytold/docs-m3-m4
Docs after M3 and M4, plus three fixes the review found (never-crash, web restore, guard test)
2026-10-05 06:46:50 +07:00
bflatastic a965d8df49 M3.9: an edit that only allocates ids still counts as a change
`Project::same_content` ignored `next_id`, so an edit that only took an id was dropped as a
no-op and the id could be handed out again (an edit may keep it beyond the project).
`guard::tests::the_session_survives_a_panicking_edit`, merged after M3.9, failed on main for
this reason. Ids now count; setting a value to what it already is still records nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:43:10 +07:00
bflatastic cb892b5239 M4.12: docs: ROADMAP, parity, web, preferences and agents brought up to date after M3 and M4
- parity: the status note covers the M3.9–M4.12 passes (feature counts unchanged: they fixed
  behaviour inside features already counted done) and the GPU effect count matches EFF-5 (280);
  the Layers, Compositions, Interface, Project and Preview rows name what is left and what
  landed; landed items in "Highest-value gaps" are struck through with where they landed, the
  gaps the passes left are items 16–18, and the closing paragraph no longer says 69 menu entries
  are disabled.
- ROADMAP: what is left includes the preview gaps.
- web: a restored session with unsaved changes stays modified and asks before closing.
- preferences: Adaptive Resolution Limit applies while dragging, not to playing previews.
- agents: nested comp settings and New Comp from Selection for several items.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:35:00 +07:00
bflatastic a12d4ae1fa M3.9: a browser session restored with unsaved changes stays modified
The web app reopens the last visit's project and, when it had unsaved changes, marked it
modified with `bump()`. Since M3.9 the modified mark follows the saved snapshot, and a bump on
the very project just opened counts as "back at the saved state", so restored changes looked
saved (no `*`, no unsaved-changes prompt). `Session::mark_unsaved` forgets the saved snapshot
instead: the project stays modified until saved, whatever is undone. Regression test included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:33:40 +07:00
bflatastic b21e04b301 M4.12: never crash: hostile input in New Comp from Selection, an empty work area in Cache Frames When Idle
Following AGENTS.md's Never crash rules for the M3 / M4 additions:
- Cache Frames When Idle panicked (`clamp` with min > max) when the work area was inverted
  (start set past the end); an empty work area now has nothing to cache.
- `file.newCompFromSelection`: the sequence overlap times the layer count overflowed for a huge
  `overlapDuration` (wrapping to a wrong comp length without overflow checks); negative or
  non-finite values fall back to 1 s and the product saturates. The lead item is read with
  `get()` instead of indexing.
- Layer Settings' enablement reads the first selected layer with `first()`.
- Regression tests for both (each failed before the fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:30:46 +07:00
Brandon Thomas 339a05d771
Merge pull request #37 from storytold/pr/never-crash-clean-crates
Never crash: deny panic lints in the already-clean crates and apps
2026-10-04 15:34:52 -04:00
Brandon Thomas 7f1e2df862
Merge pull request #24 from storytold/pr/never-crash-opus-vp9
Never crash: Opus and VP9 encoders without expect()
2026-10-04 15:34:33 -04:00
Brandon Thomas 61e859e3de
Merge pull request #23 from storytold/pr/never-crash-hevcenc
Never crash: HEVC encoder without expect()/unreachable!()
2026-10-04 15:34:15 -04:00
Brandon Thomas 6aa490b826
Merge pull request #22 from storytold/pr/never-crash-av1enc
Never crash: AV1 encoder without expect()/unreachable!()
2026-10-04 15:33:56 -04:00
Brandon Thomas c6b8f5412f
Merge pull request #36 from storytold/pr/never-crash-ui
Never crash: frame-pool panic handler and ui-egui without expect()
2026-10-04 15:33:38 -04:00
Brandon Thomas 4926dd2c4c
Merge pull request #35 from storytold/pr/never-crash-render-gpu
Never crash: render and gpu crates without panic!()
2026-10-04 15:33:18 -04:00
Brandon Thomas fc0eee53dc
Merge pull request #31 from storytold/pr/never-crash-raster-path
Never crash: raster and path crates without expect()/unwrap()/unreachable!()
2026-10-04 15:32:58 -04:00
Brandon Thomas 5d716c2f5a
Merge pull request #29 from storytold/pr/never-crash-text
Never crash: text layout and font resolution without expect()
2026-10-04 15:32:39 -04:00
Brandon Thomas f82ac49855
Merge pull request #26 from storytold/pr/never-crash-track
Never crash: trackers and camera solver without expect()
2026-10-04 15:32:18 -04:00
Brandon Thomas 64531e4aac
Merge pull request #33 from storytold/pr/never-crash-effects
Never crash: effects crate without expect()
2026-10-04 15:32:00 -04:00
Brandon Thomas c6488d0cd4
Merge pull request #30 from storytold/pr/never-crash-engine
Never crash: engine without expect() (job polling, commands, menus)
2026-10-04 15:31:40 -04:00
Brandon Thomas f864b29549
Merge pull request #27 from storytold/pr/never-crash-script
Never crash: scripts nested too deeply return an error instead of overflowing the stack
2026-10-04 15:31:21 -04:00
Brandon Thomas 46cd757f99
Merge pull request #21 from storytold/pr/never-crash-expr
Never crash: reject deeply nested expressions instead of overflowing the stack
2026-10-04 15:31:01 -04:00
Brandon Thomas a3976913c2
Merge pull request #34 from storytold/pr/never-crash-time
Never crash: Tick and timecode arithmetic can't overflow or divide by zero
2026-10-04 15:30:42 -04:00
Brandon Thomas 6f52a0aab8
Merge pull request #19 from storytold/pr/never-crash-project
Never crash: project crate without expect()
2026-10-04 15:30:22 -04:00
Brandon Thomas 010cb8129f
Merge pull request #17 from storytold/pr/never-crash-media
Never crash: media crate without expect()
2026-10-04 15:29:59 -04:00
Brandon Thomas 43c485e31e
Merge pull request #14 from storytold/pr/never-crash-interchange
Never crash: interchange import/export (bad precomp refs, deep XML) without panics
2026-10-04 15:29:41 -04:00
Brandon Thomas d350f4e7ac
Merge pull request #25 from storytold/pr/never-crash-lottie
Never crash: Lottie enum values can't overflow
2026-10-04 15:29:22 -04:00
Brandon Thomas a792844d7e
Merge pull request #16 from storytold/pr/never-crash-pdf
Never crash: PDF/EPS close-path, CFF outlines and PostScript radix numbers
2026-10-04 15:29:03 -04:00
Brandon Thomas e171c33686
Merge pull request #15 from storytold/pr/never-crash-svg
Never crash: SVG path data loop and deep nesting
2026-10-04 15:28:44 -04:00
Brandon Thomas 91a3b14cb2
Merge pull request #18 from storytold/pr/never-crash-psd
Never crash: PSD reader bounds overflow and input-sized allocations
2026-10-04 15:28:25 -04:00
Brandon Thomas a69f417d63
Merge pull request #28 from storytold/pr/never-crash-guard
Never crash: last-resort guard around command execution, and a logging panic hook
2026-10-04 15:28:05 -04:00
Brandon Thomas e6bda37e80
Merge pull request #12 from storytold/pr/never-crash-steering
Never crash: steering rules, clippy.toml, forbid unsafe
2026-10-04 15:27:45 -04:00
BFlat 7ee6d6a301
Merge pull request #38 from storytold/m4-nested-comps
Previews (M4): Preserve frame rate / resolution when nested, nested comps past their end, one motion blur gate
2026-10-05 02:08:13 +07:00
bflatastic e295679b7f M4.11: docs: architecture, parity and ROADMAP cover nested comps and motion blur
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:56:17 +07:00
bflatastic 995d99f938 M4.11: one motion blur gate for layers, masks, effects and Advanced 3D
`Renderer::mb_on` (render options × the comp's switch × the layer's switch as the precomp
layers above limit it) now decides everywhere:
- Mask motion blur checked only the comp's switch and the layer's own switch, so Render
  Settings ▸ Motion Blur ▸ Off for All Layers and a precomp layer with motion blur off still
  blurred masks; it now takes the gate (`masks::MaskBlur`) and the comp's Samples Per Frame
  (four in Draft) instead of a fixed eight.
- Effects that read the shutter (`EffectEnv::shutter`) get it only when the layer is motion
  blurred in this render.
- Advanced 3D layers follow the precomp layers' Motion Blur switches too.
- The layer cache key of a layer with masks or effects includes whether it is blurred and the
  comp's shutter and samples, so a buffer blurred for the viewer is never reused by a render
  with motion blur off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:55:34 +07:00
Brandon Thomas c5e33f1a02 Never crash: deny panic lints in the already-clean crates and apps
These crates have no production panic sites: add the deny attribute so they stay clean
(geom, color, model, automation, host, export, plugin, and the desktop, CLI and web apps). The
plugin's wasm-only test module gets a separate cfg(test) attribute so clippy recognises it as
test code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:52:39 -04:00
Brandon Thomas 543942d085 Never crash: frame-pool panic handler and ui-egui without expect()
ui-egui without expect()/unreachable!(): the frame pool is optional (rayon's global pool if the
OS refuses threads) and gets a panic_handler, because a panic in a rayon spawn() job aborts the
whole process by default; render-queue progress, the text-edit anchor and the GPU viewer
texture are bound where they're checked; the settings panel's Bool arm no longer panics.
Denies the panic lints in the crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:52:28 -04:00
bflatastic 0b5cff1743 M4.10: a nested comp shows nothing before it starts or after it ends
A precomp layer trimmed out (or time-remapped) past its nested comp's end kept drawing the
nested layers whose bars ran on. Like After Effects, the nested comp now shows nothing outside
its own span (`Comp::covers`), flattened, through a proxy or with Collapse Transformations, on
the CPU and the GPU (both go through `Renderer::source` / `collapse_into`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:47:54 +07:00
bflatastic 0fe6db00e8 M4.9: Preserve frame rate when nested or in render queue, Preserve resolution when nested
Composition Settings ▸ Advanced has both options (they were missing from the model, the
renderer and the dialog):
- Preserve frame rate: nested in another comp, the comp shows only its own frames
  (`EvalCtx::nested_time` floors the precomp layer's source time to the nested comp's frame
  rate; used for the nested frame, its proxy, aux channels, collapsed transformations and the
  viewer's internal wireframes), and the Render Queue renders it at its own rate whatever the
  Frame Rate override (`RenderSettings::rate`).
- Preserve resolution: nested in a comp rendered at Half / Third / Quarter, it renders at full
  size and the buffer's scale places it.
- `comp.settings {preserveFrameRate, preserveResolution}`, `comp.info` reports them, scripts
  read and set `CompItem.preserveNestedFrameRate` / `preserveNestedResolution`, Pre-compose
  copies them, and the dialog registers `dialog.comp.preserveFrameRate` /
  `dialog.comp.preserveResolution`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:33:14 +07:00
Brandon Thomas e910858445 Never crash: PostScript radix numbers outside 2..=36
In EPS/PostScript, `0#7` asked i64::from_str_radix for radix 0, which panics (found by
fuzzing). Radixes outside 2..=36 are not numbers now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:21:14 -04:00
Brandon Thomas fe89ab9146 Never crash: render and gpu crates without panic!()
render: the debug-only quantisation check uses debug_assert! instead of panic!. gpu: the
test-only panic on a wgpu validation error is cfg(test) with a narrow allow, and release
builds only log. Test-only unreachable!() calls become panic!(). Denies the panic lints in both
crates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:20:37 -04:00
Brandon Thomas fc737d76da Never crash: Tick and timecode arithmetic can't overflow or divide by zero
Tick arithmetic saturates, seconds-to-tick conversion clamps to Tick::MIN..=Tick::MAX (NaN is
zero), zero rates/timebases no longer divide by zero, and timecode / feet+frames parsing and
formatting use checked or saturating math. `layer.timing {"delta": -1e308}` over the control
channel overflowed FrameRate::snap_nearest (found by fuzzing every command), and a timecode
field holding 99999999999999:00:00:00 overflowed parse_timecode. Denies the panic lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:20:33 -04:00
Brandon Thomas 5dd7d9bb57 Never crash: effects crate without expect()
Effects without expect(): nested parameter groups are looked up with ? (falling back to the
effect's top level), the OCIO effects use named constants for the built-in ACES spaces instead
of expect()ing a table lookup, curve fitting and Path Text no longer expect on just-pushed
vectors. Test-only unreachable!() becomes panic!(). Denies the panic lints in the crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:14:16 -04:00
BFlat 4e98b8c4bd
Merge pull request #32 from storytold/m4-preview
Previews (M4): RAM preview keys and eviction, Auto resolution while playing, Cache Before Playback that fits, Cache Frames When Idle, purges
2026-10-05 01:13:37 +07:00
Brandon Thomas 19c1d2ea1d Never crash: reject SVGs nested too deeply
roxmltree recurses per element and overflowed a 2 MiB stack at a few thousand nested
elements (aborting the app). parse() now scans the element depth first and returns
Error::Xml beyond 256 levels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:05:58 -04:00
Brandon Thomas ad5aa542b4 Never crash: reject timeline documents nested too deeply
FCP 7 XML / FCPXML nested about 1 000 elements deep overflowed an 8 MiB stack in the XML
parser (aborting the app). Import now scans XML and OTIO JSON nesting first and returns
Error::TooDeep beyond 256 levels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:05:57 -04:00
Brandon Thomas d1413d5209 Never crash: bound PSD descriptor nesting
The descriptor depth limit restarted at 0 inside every nested descriptor (Objc / GlbO /
ObAr), so a crafted file of 100 000 nested descriptors (2.4 MB) recursed until the stack
overflowed and aborted the app. The depth now carries through nested descriptors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:05:55 -04:00
bflatastic da3177954f M4.8: docs: parity covers the cached playback fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:04:21 +07:00
bflatastic fa27d621e0 M4.8: Edit ▸ Purge clears what it names: disk and snapshot purges keep the RAM preview, memory purges drop decoded footage
- Every purge emptied the viewers' RAM preview; Purge ▸ All Disk Cache and Snapshot now leave
  it (Image Cache Memory, All Memory, All Memory & Disk Cache, All and All 3D Cache still
  clear it).
- The memory purges also drop the decoded footage frames (`FootageSource::purge`, the media
  pool's `clear_frames`; decoders stay open), so footage reads decode again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:03:47 +07:00