4571 Commits
Author SHA1 Message Date
FredApps 38624ac67e export: write Targa sequences through craft-tga (craft-libs#778)
Use craft_tga::write_top_left_raw from craft-libs#3076, which shares the
footerless, uncompressed top-left stream this export wrote with the
image crate's encoder.
2026-11-23 06:39:06 +07:00
Terra854andFredApps 7e2d025620 media: cover generated Motion JPEG AVI and PCM (#4069)
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-23 03:58:13 +07:00
Terra854 268b982ade media: honor delayed PCM starts in shared AVI (#4071) 2026-11-23 03:36:11 +07:00
Valentin KleinandFredApps 29d116c6f7 Convert To Bezier Path works on a selected shape layer or group, for example right after drawing a rectangle (#3220)
* #3057: Convert To Bezier Path converts a selected shape layer's or group's parametric paths

Right after drawing with the Rectangle, Ellipse or Polygon tool only the layer is selected,
and Convert To Bezier Path fell through to the mask branch and reported "no masks". It only
converted when the parametric path row itself (Rectangle Path 1) was selected.

- A selected shape group converts the parametric paths inside it, nested groups included.
- With only layers selected, a shape layer converts its parametric paths, as a selected
  layer's masks are targeted. Locked layers are skipped; animated parametric paths are left
  alone and reported (skippedAnimated), and selecting the path still converts it.
- Masks win only when targeted (mask param, selected mask, mask vertices) or when one uses
  RotoBezier: plain masks no longer turn the command into a silent no-op.
- An explicit layer/layers limits selected shape items to those layers; an unmatched mask
  param is an error instead of converting every path.
- Errors say what to select instead of asking for masks.

A PSD shape layer importing as a layer with a mask matches After Effects; no change there.

Fixes #3057

* #3057: Convert To Bezier Path converts a layer named twice once

A layer given twice in `layers` (by id and by name) was widened twice: its parametric paths were queued twice, and the second replacement found no such item, so the whole command failed. The layer list is deduplicated before the widening, which also keeps skippedAnimated from counting a path twice.

* #3057: Convert To Bezier Path leaves locked layers and a group's animated paths alone

Shape items given as `items` or selected on a locked layer converted anyway (only the layer-wide conversion checked locks); they now go through unlocked(), an error when every one is locked. A selected group skips its keyframed or expression-driven parametric paths and reports them in skippedAnimated, as converting a whole layer does; a path selected itself still converts at the current time.

* Doc comments for the functions this PR touches

* #3057: Convert To Bezier Path gives an explicit mask priority over shape items

With a `mask` given, a selected parametric path (or `items`) was converted instead of the mask, an unmatched `mask` converted the shape rather than reporting the miss, and a locked shape-item layer could reject the call before the mask was looked at. Shape items are now ignored when `mask` is present.

* #3057: Convert To Bezier Path converts a selected mask with the selected shape paths

With a mask and a parametric path both selected, only the path converted and the mask kept its RotoBezier tangents. Masks the selection targets (a selected mask or its property, mask vertices, on unlocked layers in scope) now convert in the same undo step, the result reports them as masks, and they stay selected with the new paths. An explicit `mask` keeps its priority.

* #3057: Convert To Bezier Path keeps mask conversion to an explicit layer

With `{"layer": A}` and a RotoBezier mask selected on layer B, the mask branch converted B's mask and left A unchanged. The resolved masks are now scoped to the explicit layer/layers (falling back to those layers' own masks), the priority check only counts selected masks and vertices in scope, and the scoped targets are edited directly instead of being resolved again.

* #3057: Convert To Bezier Path leaves masks on locked layers alone

A scoped or selected RotoBezier mask on a locked layer was converted through the mask branch. Masks on locked layers are now dropped after the scope and its fallback are resolved, so a locked selected mask does not hand the conversion to other masks; when every targeted mask is locked, the command reports the lock, as it does for shape items.

* #3057: Convert To Bezier Path converts in the composition `comp` names

With `comp` naming a composition that is not active, an explicit `mask` was resolved there but filtered against the active composition ("no mask matches"), and explicit `items` were looked up in the active composition. convert_to_bezier now works in the composition comp_id resolves, and selected_shape_items returns the composition layer_p resolved for explicit items (also used by Group and Ungroup Shapes); a selection made in another composition does not apply.

* Convert To Bezier Path: explicit items add no selected masks

With explicit `items`, only those shape paths convert. A RotoBezier mask
selected on the same layer no longer loses its RotoBezier flag as a side
effect. Regression test added.

* Convert To Bezier Path: explicit items without a parametric path convert no mask

* Convert To Bezier Path: items count as given only as a list

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-23 02:31:15 +07:00
Valentin Klein 525dcfc0d8 Browse… buttons in a script's own dialogs and panels open the file dialog instead of doing nothing (#3253)
* Scripts: a ScriptUI Browse… button opens the file dialog

Fixes #2778.
Fixes #2894.

File.openDialog, File.saveDialog, Folder.selectDialog and the instance
openDlg / saveDlg / selectDlg were stubs that returned null, so a script
dialog's or a dockable ScriptUI panel's Browse… button did nothing.

On a script-host thread, in an app that shows them, the script now asks
for the dialog (Session::script_ui.file_dialogs, each with an id), hands
the session back like a modal dialog's show() does and waits for the
answer: a File (an array with multiSelect), a Folder, or null when
cancelled. The script's filter becomes the dialog's (its name, "All Files"
for *.*); without extensions every file shows. Headless runs, the Script
Console, the web and Shutdown scripts get null at once.

The app shows the dialog after the pass's events: blocking on Windows
(Hooks::pick_file_dialog), without blocking on macOS and Linux, one at a
time; a non-blocking dialog that ends without answering counts as
cancelled. scriptui.fileDialogs lists the waiting dialogs and
scriptui.fileDialog answers one (refused while file access is confined,
and refused to scripts). A dialog leaves the list only when its script
has the answer; the script's windows refuse events meanwhile, except
scriptui.close, which cancels the file dialog first. A script host that
ends takes its dialogs with it.

* Scripts: carry a file dialog's prompt, start location and filter to the native dialog (#2778)

serve_file_dialogs collected the script's prompt, start folder and save filter
but dropped them at the host boundary. FileDialog::Script now carries prompt and
start, and new ScriptFolder and ScriptSave requests carry the folder dialog's
prompt/start and the save dialog's prompt and whole filter (label, extensions,
any file) instead of the default name's extension. Both the blocking and the
non-blocking host dialogs apply title, initial directory and filters; Save also
goes through the blocking hook where one is set. Hook-level regression test
asserts all three requests.

* Scripts: a hidden window paints so a script's file dialog is shown (#3253 review)

* Scripts: formatting (#3253)
2026-11-22 12:58:56 -06:00
Valentin Klein e7bc3ad808 Audio Levels in the Audio panel show the value at the current time, with keyframes and expressions (#3234)
* Audio panel: Audio Levels show the value at the current time, keyframes and expressions included (#3227)

The level fields read the property's static base value. They now evaluate Audio Levels the way
the Timeline and Effect Controls do (EvalCtx at the current time: keyframes at layer time, the
expression host), and they are hot-text fields whose edits run the Timeline's prop.set, so a
keyframed property gets a key at the current time. The Timeline's Link Channels state applies
(#2485). New automation ids audio.levelLeft and audio.levelRight carry the shown value; the
fields are drawn only when the panel is wide enough for them.

Fixes #3227

* Audio panel: a Ctrl+Alt scrub of Audio Levels is proportional, as in the Timeline (#3227)

The Audio panel's prop.set now carries the proportional flag the Timeline sends for a Ctrl+Alt
(Cmd+Opt) scrub, so the change spreads over the selected layers by selection order.

* Audio panel: a scrub of expression-driven Audio Levels moves the keyframed value by the scrub (#3227)

prop.set takes a scrub's change from the keyframed value under the expression. The Audio panel
sent the shown (expression-evaluated) value moved by the scrub, so the expression's offset was
added to every selected layer on every frame of the scrub. A scrub now sends the keyframed value
moved by the shown change; a typed value is still set as it is.

* Audio panel: narrow panels keep the level fields; typing one channel keeps the other's value under the expression (#3227)

The level fields were left out below 110 px (the panel showed them down to 80 px before this
PR); 80-110 px now get a compact layout with L / R labels. Typing into one channel of an
expression-driven Audio Levels wrote the other channel's shown (expression-evaluated) value into
the value under the expression; that channel now keeps its own. Adds tests for a linked and an
Alt scrub and for typing into an expression-driven field.

* Audio panel: Audio Levels evaluate with the session's footage source (#3227)

The level fields built their expression context without the footage source, so an expression
sampling footage with sampleImage disagreed with the render. They now use the session's source.
Regression: nonzero sampled footage drives both channels.

* Audio panel: each level scrub is its own undo step (#3234 review)
2026-11-22 12:56:45 -06:00
FredApps 108e636260 test(ui): pump and wait longer while prefetch setup fills the cache (#4096)
Fixes #4095.

This is a hardening change for a FreeBSD CI flake; it may not fully fix the flake.

On the scheduled FreeBSD 15 x86_64 run, ui_preview_align::playback_prefetches_past_the_cached_frames_ahead failed during setup: after requesting frames 0..120 it asserted the cache equalled [0, 1, …, 119] and got only [0]. The wait was eight seconds and did not step the harness. The same test passed on the previous day's scheduled run.

This PR steps the harness while waiting, gives the workers up to 60 seconds, and reports how many frames actually landed. If workers never fill the cache under load, the test can still fail.

The FreeBSD aarch64 job only cross-compiles tests; it does not run them, so a green aarch64 leg is not a test pass.
2026-11-22 23:28:40 +07:00
FredAppsandCodex 171e92b077 media: cover legacy Motion JPEG MOV import without FFmpeg (#4064)
Co-authored-by: Codex <codex@openai.com>
2026-11-22 04:58:34 +07:00
Dylan M. Taylor 8489edfc90 psd: share plane reading, RLE row counts, and ZIP framing via craft-psd (#786) (#4061)
* psd: share plane reading, RLE row counts, and ZIP framing via craft-psd (#786)

* psd: fix parity test imports and ImageResource::new arity

* psd: fix borrow conflict in parity test helper

* psd: use shared zip_decompress_up_to in opt reference decoder

* psd: remove shadowed imports in parity tests
2026-11-21 15:52:25 -05:00
Terra854andDylan M. Taylor 1e139e5914 Use shared cancellation in EffectCraft media reads (#4044)
* Use the shared cancellation flag in EffectCraft media reads

* chore: repin craft-libs media crates to main (ba25ccd2)

* deps: align the FilmCraft cancellation context

* chore: use origin/main craft-libs pin (587339c7)

* chore: repin craft-libs media crates to main (6a061a30)

* chore: align craft-media-source (ba25ccd2) and filmcraft (3d746514) to share one cancellation context

* deps: use the merged FilmCraft cancellation revision

* chore: align craft-media-source (6a061a30) and filmcraft (d6cc257f)

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 15:46:43 -05:00
Dylan M. Taylor 61dfd6c4dc EPS: enable sampled images, scale step budget, and align CMYK with After Effects (#4057)
* pdf,eps: enable EPS image rendering, scale step budget, and align CMYK with After Effects (#3677)

* chore: repin craft-ps to 068e079c for save/restore dictionary journaling (#790)

* chore: align craft-pdf/hayro revs and xtask pdf-deps pin to 068e079c
2026-11-21 14:34:09 -05:00
Terra854 2f16feb12f media: present full-range high-depth RGB from the shared decoder (#4063) 2026-11-21 14:10:33 -05:00
Terra854andDylan M. Taylor 8fc2bc99c6 media: route MXF through the shared header probe (#4058)
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 14:02:47 -05:00
Terra854andDylan M. Taylor 563fea6582 media: use the shared GIF text control fix (#4040)
* media: use the shared GIF text control fix

* chore: repin craft-gif to storytold/craft-libs main (ba25ccd2)

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 13:33:27 -05:00
Terra854andDylan M. Taylor f70208cef3 media: route MP4 and Matroska FLAC through craft-audio (#4049)
* media: route MP4 and Matroska FLAC through craft-audio

* media: propagate errors when generating FLAC test fixtures

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 13:31:03 -05:00
Terra854andDylan M. Taylor a28fcd18dd media: route standalone FLAC through craft-audio (#4045)
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 13:30:18 -05:00
Terra854 716d03e462 media: probe Matroska ProRes coded alpha (#4034)
* media: probe Matroska ProRes coded alpha

* Keep shared Matroska reads when ProRes alpha is unknown
2026-11-21 13:28:05 -05:00
Terra854andDylan M. Taylor ea64796b6e media: derive audio-only AVI PCM duration from indexed blocks (#4042)
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 13:24:09 -05:00
Terra854 abb7b66de5 psd: share legacy Mac Roman layer-name decoding (#4056) 2026-11-21 13:22:30 -05:00
FredAppsandCodex 951c8b4da7 Seek independent ProRes frames in scanned AVI streams (#4047)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 13:03:31 -05:00
FredAppsandCodex f02e6412ce media: read AAC configuration through the shared byte source (#4046)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 13:03:27 -05:00
Terra854 887c08b31e media: present full-range 8-bit RGB from the shared decoder (#4052) 2026-11-21 12:53:55 -05:00
Terra854 f7ab031c3c media: present monochrome frames from the shared decoder (#4051) 2026-11-21 12:53:50 -05:00
Terra854 6e3459a8eb media: use the shared reader for uncompressed RGB AVI (#4050) 2026-11-21 12:53:47 -05:00
Terra854 fcf35f3f9f media: derive AVI video duration from indexed frames (#4037) 2026-11-21 12:53:44 -05:00
Terra854 4e97ebe0ae media: include the final AAC transport packet in duration (#4033) 2026-11-21 12:53:40 -05:00
Terra854 8bc329ac19 media: preserve Matroska presentation duration (#4032) 2026-11-21 12:53:37 -05:00
Terra854 eb5fa36bcf media: preserve Matroska display aspect on import (#4029) 2026-11-21 12:53:34 -05:00
fae7ad7641 media: avoid nested ProRes decode work under the MOV reader lock (#4028)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
2026-11-22 00:17:12 +07:00
f4d45dfef3 media: fence fractional MOV PCM edits on the packet clock (#778) (#4031)
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-21 11:35:49 -05:00
FredAppsandCodex c22f034bf3 media: preserve Matroska FFV1 metadata without CodecPrivate (#4041)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 11:30:25 -05:00
FredAppsandCodex 8de16e41ba media: preserve APV fallback outside the guarded MP4 subset (#4039)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 11:14:13 -05:00
FredAppsandCodex b76b883e90 media: keep shared AVI playback when ProRes alpha cannot be inferred (#4035)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 11:06:55 -05:00
Dylan M. Taylor d46142eb69 media: preserve container audio resampling phase across seeks (#4026) 2026-11-21 10:42:03 -05:00
FredAppsandCodex 52c78fd252 media: preserve the final picture in regular H.264 transport streams (#778) (#4030)
* Preserve the final picture duration in regular H.264 transport streams

* Test TS duration through the public H.264 encoder API

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-21 22:18:42 +07:00
Dylan M. Taylor 7334a14ac2 media: enable FFV1 and APV decode in craft-video route (#4027)
* media: enable FFV1 and APV decode in craft-video route

* media: supply FFV1 config_record extradata in TrackDecoder unit test
2026-11-21 09:43:57 -05:00
Dylan M. Taylor 775b157e66 media: probe AVI ProRes coded alpha parity (#4025)
* media: probe AVI ProRes coded alpha parity

* media: fix prores::Profile, ChromaFormat, and Encoder::with_config in AVI alpha test
2026-11-21 09:03:46 -05:00
FredAppsandCodex b71670634a media: honor MXF descriptor color fallback for ProRes (#778) (#4023)
* media: honor MXF descriptor color fallback for ProRes (#778)

* style: format MXF descriptor color fallback

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-21 21:01:09 +07:00
Terra854 5f435d45ef fix(media): silence reads past the MOV audio edit end (#4024)
* Stop presenting MOV audio at the edit end

* Credit Terra854 in EffectCraft About
2026-11-21 08:24:47 -05:00
FredAppsandCodex 917a68783a Preserve MXF descriptor pixel aspect in the shared reader (#4022)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 19:31:33 +07:00
FredAppsandCodex bf85299410 media: clamp MXF picture duration and seeking to indexed frames (#4021)
* Use the same indexed MXF picture window for duration and seek

* Apply hosted rustfmt to MXF window test

---------

Co-authored-by: Codex <codex@openai.com>
2026-11-21 18:34:46 +07:00
FredAppsandCodex 0ecc246f05 media: preserve standalone audio resampling phase across seeks (#4017)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 17:50:20 +07:00
Terra854andDylan M. Taylor fd2e7d7b6f fix(media): preserve leading MOV audio silence and saturate positions (#4005)
* fix(media): honor MOV audio edit lists on first read

* fix(media): preserve sign on ISO-BMFF edit-list position overflow

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-21 05:30:06 -05:00
Dylan M. Taylor 7003f0a056 media: switch non-fallback AUDIO_EXTENSIONS and convert tests to craft-libs (#4020)
* media: switch non-fallback AUDIO_EXTENSIONS and convert tests to craft-libs

* media: accept FrameView in frame_to_image
2026-11-21 05:19:23 -05:00
FredApps 0fbf652f49 test: report stalls in the ProRes MOV roundtrip (#4019) 2026-11-21 17:07:08 +07:00
FredAppsandCodex c4bf4f5925 Round recorded MXF start timecodes to the nearest video frame (#4018)
Co-authored-by: Codex <codex@openai.com>
2026-11-21 16:31:31 +07:00
Dylan M. Taylor c03539fafb media: route AVI, MPEG-TS, and MPEG-PS through craft-media (#4010)
* media: route AVI, MPEG-TS, and MPEG-PS through craft-media

* media: add tick_to_rational_units and unwrap CodecParams dims

* media: deduplicate container source builder and add AVI/MPEG unit test

* media: import avi mux types from craft_media::avi root in test

* media: test estimate_mpeg_frame_rate via pts helper

* media: expand AVI and MPEG-TS unit test coverage

* media: write >=5 TS packets in MPEG-TS unit test for sniff

* media: expect MPEG-2 TS container name in unit test

* media: restore ContainerFile::Avi arm in target_sample
2026-11-21 04:24:37 -05:00
Dylan M. Taylor 05f181cc04 media: route MXF video and PCM/AES3 sound through craft-media::mxf (#4006)
* media: route MXF video and PCM/AES3 sound through craft-media::mxf

* media: use SoundFormat::Aes3Element for MXF AES3 sound

* media: address MXF presentation window, timecode rate, reorder fallback, and unit coverage

* media: fix StartTimecode and MediaSource::audio calls in MXF unit test

* media: fix unnecessary cast and add MXF video/trim unit test

* media: use PictureCoding::Avc and smoke-test open_mxf video+sound

* media: pass raw_bytes Vec<u8> to open_bytes in MXF unit test

* media: disambiguate Arc<[u8]> type in MXF unit test

* media: remove duplicate AudioBackend enum after merge

* media: match AudioBackend::Decoder struct variant

* media: fix MXF sync_sample_before assertion in unit test
2026-11-21 03:37:05 -05:00
FredApps c821d6e0e7 media: avoid scanning Opus payloads at open (#4011)
* Avoid scanning Opus payloads during track open

* Apply rustfmt to the Opus timing regression

* Split Opus regression scenarios for Clippy
2026-11-21 14:46:35 +07:00
Dylan M. Taylor a29e69d257 media: generate pure-Rust AAC fixtures for gap and seek tests (#4015) 2026-11-21 01:22:53 -05:00