← Back to Pull requests

feat: show effects and transitions as moving thumbnails #4224

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Nov 11, 2026 00:01 UTC
Author

Description


<!-- What does this PR do and why? Bullet points encouraged. -->
  • Effects and transitions get moving thumbnails, so a type can be picked by what it does rather than by its name.

  • - The library tab gains Effects and Transitions sections of large tiles. A tile drags onto the timeline as an item from the tree does.
    - The effect and transition pickers can switch to tiles (a toggle beside search, remembered across pickers), and the arrow keys move through them by tile and by row.
    - A tile shows a still, and plays under the pointer or while it is selected. Stills are drawn only for tiles on screen and frames only while one plays; the frames of the last few played stay cached.
  • Thumbnails show each type on the project's own content, at its size in the project:

  • - The library applies effects to the frame the preview has drawn, taken from its clean frame (without selection outlines or gizmos) instead of drawing the scene again. It takes the frame again only when the preview draws a different one and has settled.
    - An effect picker applies them to the object it adds to, drawn alone at the playhead and cropped to what it draws, through the media readers the preview already has open.
    - A transition picker goes between the two sides of the edge it sets.
    - With no content (no preview, nothing drawn), sample pictures are used.
  • Effects apply to the content at its size in project units and only the result is scaled down, so an effect behaves as it would in the project (a clipping crops from the object's own bounds). Built-in recipes animate each effect's main value from none to the most at the frame shown at rest, with sizes scaled to the content. LibraryThumbnailRecipes lets extensions register recipes for their own types.

  • Transitions loop out, in and out again. Two sides go back and forth (A → B → A). A side alone is drawn the way it goes in the project, in from nothing or out to nothing, and played backwards for the other way, because a slide out to nothing moves nothing over the outgoing side and would only vanish.

  • A captured picture is decoded once and shared by every tile drawn from it. Cheap effects then take 2-3 ms a still on an M3; effects that run shader graphs still take about 200 ms because each thumbnail renderer compiles its programs again (#4218).

  • An image source only opens files, so a captured picture passes through a PNG in a folder of its own (Directory.CreateTempSubdirectory, owner-only on Unix), which is removed as soon as the picture is decoded. The project's frames never sit in the shared temp folder (/tmp on Linux), and nothing is left behind.
  • Screenshots / Render output


    <!-- Show what this PR changes on screen or in rendered output. Write "None" if nothing visible changes. -->
    Headless captures in the dark theme, of a project with two gradient clips, a "Summer trip" title and a sun.

    | Library: effects | Effect picker on the title |
    | --- | --- |
    | !Library effects | !Effect picker |

    | Library: transitions | Transition picker at the cut between the clips |
    | --- | --- |
    | !Library transitions | !Transition picker |

    <details><summary>One loop of six transitions</summary>

    Each row is one loop of a thumbnail, 12 of its 60 frames from left to right. In each pair of rows, the first is a frame alone, as in the library, and the second an edge between two clips. From the top: Slide, CrossDissolve, DipToColor, Iris, Wipe, Push.

    !Transition loops

    </details>

    Affected areas


    <!-- Check the modules this PR touches. These map to the area- labels. -->
  • Beutl.Engine (rendering / scene / track)

  • Beutl.ProjectSystem (project / document persistence)

  • UI (Beutl.Editor, Beutl.Editor.Components, Beutl.Controls)

  • Beutl.Extensibility (plugin abstractions)

  • Beutl.NodeGraph (node editor)

  • Beutl.FFmpegIpc / Beutl.FFmpegWorker (media IPC boundary)

  • Beutl.Api (server API client)

  • Build / CI / docs only
  • Breaking changes


    None. The public API only grows:
  • Beutl.Editor: LibraryThumbnailRecipes, LibraryThumbnailContext, and IPreviewPlayer.CleanPreviewImage and AcquireCleanPreview() with default implementations.

  • Beutl.Controls: AnimatedThumbnail, IAnimatedThumbnailSource, AnimatedThumbnailFrames.

  • Beutl.Editor.Components: LibraryGalleryView, LibraryGalleryItemViewModel, and a LibraryTabViewModel(IServiceProvider?) constructor.
  • Raises the format floor?


    No. The library tab's display modes gain Effects and Transitions entries in the existing dictionary (golden settings.json updated), and the picker's tile toggle is kept in Preferences. Nothing in a project changes.

    Test plan


  • tests/Beutl.UnitTests/Editor/LibraryThumbnailTests.cs: every built-in effect and transition draws; a recipe moves its effect; effects draw on the preview's frame; an element is captured alone at its size in the project; an effect applies at that size and to the object's own bounds (Clipping); content is framed in 16:9 around its size; an edge is captured as its two sides; nothing drawn falls back to the samples; a picture is decoded once (tiles draw it with its file already gone, and fail with resource sharing off); a capture leaves no file or folder behind; transitions go out and back in; a lone side goes out the way it comes in (Slide); recipes leave with their assembly.

  • tests/Beutl.HeadlessUITests/LibraryThumbnailSetTests.cs: only what is asked for is drawn; playing draws every frame and starts at the still; a refresh keeps the still until it is drawn again; tiles off screen are drawn only when asked; only a few idle sheets stay; disposing frees everything.

  • tests/Beutl.HeadlessUITests/LibraryTabPreviewThumbnailTests.cs: the frame the tiles were drawn on is not taken again, and a new frame is.

  • tests/Beutl.HeadlessUITests/LibraryItemPickerTileTests.cs: arrow keys move by tile and by row; switching to the list and back keeps the selection; a picker without thumbnails stays a list.

  • tests/Beutl.HeadlessUITests/ElementTransitionTimelineTests.cs: finds the picker's visible list, tiles or not.

  • tests/Beutl.HeadlessUITests/LibraryThumbnailCaptureTests.cs (explicit): renders the captures above.

  • Ran on macOS (M3) after merging main: the classes above, FormatManifestTests, the serialization and EditorConfig tests, and the library tab and picker classes.
  • Fixed issues / References


  • Follow-up: #4218 (short-lived renderers compile shader-graph effects again on every call)
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added Effects and Transitions tabs to the Library, with visual galleries featuring animated thumbnails, names, and descriptions.
    Added a tile view for library item pickers, including thumbnail previews, a saved view preference, and grid-based keyboard navigation.
    * Added animated previews for supported effects and transitions, using project content when available and sample imagery otherwise.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: greptile-apps[bot] Review duration: 11m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.52) × (1 − Review Confidence (0.35)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 69% · Reviewer familiarity: 35%
    35%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #4224"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 35.3% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 35.3% · Lower = rushed or shallow review
    35.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 33.7% · Safe to merge
    33.7%
    Repository