CompItem.saveFrameToPng and exportAsMotionGraphicsTemplate checked the
file-write preference only in their JavaScript wrappers. A script could call
comp.saveFrameAs or essential.exportTemplate itself (app.run, __exec) and the
native handlers wrote the file with the preference off.
Session::refuse_export and write_output_with now refuse when the running
command was issued by a script and the preference is off, so every command
that writes a path it is given is gated the same way. The wrappers check the
gate with a new side-effect-free __file("checkWrite") instead of writing an
empty file at the destination.
* Follow-up to #2823: box each of several objects around its whole matte on correction frames
With several objects, a correction frame's box came from the model's cut
of that object's strokes on the frame alone. A stroke on part of the
object boxed only that part, and SAM 2 followed only that part from
there on. Each object's matte is now carried to the frame with its own
strokes, from its first prompted frame or its nearest tracked frame, by
the walk Chain::ensure uses (now Chain::carry). These mattes are not
cached, since object keys hold tracked results.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Follow-up to #2823: carry corrections before the base from the base outwards
Prompt frames were visited in ascending order, but before the base the
carry walks towards it, so each correction there re-walked from the
root. Visit each side from the base outwards and sort the prompts back
into frame order for the tracker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Follow-up to #2823: find an object's carry root in one pass over its strokes
The root search scanned every frame's strokes from the prompt frame to
the base, for every prompt. Take the object's foreground stroke on the
way that is nearest the base in one pass instead; the root is the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* M13.35: reproduce an earlier object correction losing tracked matte
* M13.35: carry earlier object corrections from valid tracked mattes
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
* Fix#2823: Propagate boxes SAM 2 around the matte shown on the stroked frame
The tracker's box prompt came from the classic graph cut of the strokes,
which can leak into the background; SAM 2 then filled the whole box.
Build the box from the model's own matte (segment_with), the one shown
before Propagate. segment_with falls back to the classic cut when the
model can't segment, so non-model paths are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix#2823: box a lone object around the matte shown on correction frames too
A correction frame shows a matte propagated from the frame before, not a
fresh model cut, so the tracker's box came from a different matte than
the one on screen. With one object the box now comes from Chain::ensure,
the matte shown on that frame. Several objects share one shown matte, so
each keeps the model's cut of its own strokes. Cancelling while the shown
matte is computed stops instead of falling back, and the prompt frame is
read only when needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Under load its thread pulled samples before the test read the clock, so
'from the first frame' saw frame 1 and a_started_preview_follows_its_sound flaked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The PR pinned the head of a fork branch, not in craft-libs history; the crate
source is byte-identical at both revs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProRes renders had no colr atom, so the stream reported no primaries,
transfer or matrix. Write an nclc atom, as FilmCraft does for MOV, with
the codes of what the render path makes: the project's output space when
it has a working space, BT.709 otherwise.
sRGB output stays at transfer 1, which is still open on #340 and #464.
The frames don't change, so the pinned ProRes bytes move by exactly the
atom's 18 bytes.
The craft-ecproj-format pin moves to storytold/craft-libs#409's new
head, where Head::read is the one reader and saved_by() is removed.
effectcraft-project's saved_by reads savedBy with Head::read, and from
ReadError::TooNew for a project with a newer schema.
saved_by now returns None for text that is not a JSON object with a u32
schema. EffectCraft calls it only on files Project::from_json opened,
so opening and importing projects are unchanged.
effectcraft-project writes and checks the envelope of .ecproj files with
craft-ecproj-format from craft-libs: File (savedBy, then the saved view
and the project) with to_json and to_json_compact for Save Compact
Project Files, check_schema and its message, SCHEMA_VERSION and
saved_by, which stay re-exported under their names. Project, SavedView
and the schema 1 conversion stay here.
Saved files are byte-identical. saved_by now reads only a JSON object,
so a project written as a JSON array no longer reports a savedBy.
A `trailer` marker inside an unreferenced stream followed by `(` and more
than 4 KiB of text made the lexer stop at the window's end, so a later
`/Encrypt` name anywhere in the file refused a plain file. The unbounded
scan read a string there and opened it. The past-the-window fallback now
applies only when no object starts in the window or the first one opens
a dictionary (`<<`, including one split by the window's end).
Regression test with `trailer(` and `trailer[` in a stream and a later
Encrypt name.
The pre-scan window could end inside a trailer key, so a decoy like
`/Encrypted` cut right after `/Encrypt` was taken for the Encrypt key
and an unencrypted file was refused. A window that ends mid-token now
ends before that token instead, and the past-the-window fallback reads
the name whole (a real `/Encrypt` cut as `/Encryp|t` is still refused).
Tests for that boundary, for a trailer with a long /ID, and for `#`
without two hex digits staying as written in a name.
`cargo test -p effectcraft-gpu` and `cargo test -p effectcraft-ui-egui` resolve features for
one package, so after the workspace nextest run they recompiled for about 2 minutes and
1 minute 15 seconds. Both now run the lib test binaries the workspace build produced, found
with `cargo test --no-run` and the same selection. The GPU tests still run in one libtest process.
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>