Skip to content

Spacebar hand tool, Effect Controls menu, New Comp drop, switch drags (#227) - #238

Merged
bflatastic merged 5 commits into
mainfrom
fix/227-interface
Oct 8, 2026
Merged

bflatastic merged 5 commits into
mainfrom
fix/227-interface

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Four of the interface items from #227, each matching After Effects.

Item Fix
Spacebar A tap now starts or stops the preview when Spacebar is released. It only fires if no mouse button went down while it was held and the press didn't go to a text field. Auto-repeat toggles nothing more. Held, Spacebar is the Hand tool: Space+drag pans the Composition panel (as before) and now also scrolls the Timeline's ruler and time graph horizontally when zoomed in, instead of moving bars, keys or markers. A hold-and-drag neither starts nor stops playback. Shift+Spacebar and the numpad previews still run on the press.
Effect Controls context menu Right-click anywhere a control has no menu of its own (the empty area, property names, buttons such as Reset) opens the Effect menu: Effect Controls, Last Effect, Remove All, Manage Effects and all categories. The chosen effect is applied to the selected layers. It uses the menu bar's own tree (engine::menus) and drawing code (menus::menu_contents over menu_nodes). Effect headers keep their own menu.
Drop on New Composition Project items dropped on the Project panel's Create a new Composition button run file.newCompFromSelection with the dragged items (the selection when the dragged item is part of it). One item makes a comp from its settings. Several items open the New Composition from Selection dialog.
Switch drags Pressing a layer switch (A/V Features: eye, audio, solo, lock; Switches column) sets it at once. Dragging up or down gives every layer the pointer passes the state the first switch got, and rows skipped in a fast drag are included. The whole drag is one undo step: layer.setSwitch now takes merge. A single click still changes only that layer, so we kept After Effects' click behaviour rather than toggling all selected layers. Layer ▸ Switches still sets all selected layers.

Tests (egui_kittest, real pointer/key events; each fails without its change):

  • ui_viewer::spacebar_taps_preview_and_held_spacebar_pans_the_viewer
  • ui_timeline_zoom::spacebar_drag_scrolls_the_time_graph
  • ui_effect_controls::right_click_in_effect_controls_shows_the_effect_menu
  • ui_drag_drop::project_items_dropped_on_new_comp_make_a_composition
  • ui_timeline_switches::dragging_over_layer_switches_sets_them_all

docs/gaps.md G2 lists them as regression evidence for #227.

Not checked:

  • Real hardware input on macOS/Linux. Key auto-repeat was checked only through egui's repeat flag.
  • Against After Effects directly: the behaviour follows AE's public docs and how AE behaves.
  • The Timeline's Hand tool scrolls time only, not vertically.
  • The Modes column's T (Preserve Transparency) checkbox doesn't take part in switch drags.

Left out on purpose: Project panel blank-area context menu (open PR #210), Composition Settings live preview (AE applies on OK), multi-monitor support.

Gate:

  • cargo fmt --all: clean.
  • cargo clippy -p effectcraft-ui-egui -p effectcraft-engine --all-targets -D warnings: clean in debug and release, and clean on each intermediate commit.
  • cargo test -p effectcraft-ui-egui: all pass except ui_gpu::viewer_draws_gpu_frames_that_match_the_cpu. That test also fails on clean main on this Windows machine (DX12).
  • cargo test -p effectcraft-engine --lib: 406 passed.

🤖 Generated with Claude Code

bflatastic and others added 5 commits October 8, 2026 12:59
Spacebar started or stopped the preview on its press, so holding it to
pan the Composition panel (Space+drag already panned there) also
toggled playback. As in After Effects, plain Spacebar now runs its
shortcut when it is released, and only if no mouse button went down
while it was held and the press didn't go to a text field; key
auto-repeat toggles nothing more. Shift+Spacebar and the numpad
preview shortcuts still run on the press.

Holding Spacebar over the Timeline's ruler and time graph is the Hand
tool there too: dragging scrolls the time graph (when zoomed in, never
before the comp's start or past its end) instead of moving bars, keys
or markers.

Test: spacebar_taps_preview_and_held_spacebar_pans_the_viewer,
spacebar_drag_scrolls_the_time_graph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Right-clicking the Effect Controls panel did nothing outside an
effect's header. As in After Effects, a right-click anywhere a control
has no menu of its own (the empty area, property names, buttons such
as Reset) now opens the Effect menu: Effect Controls, Last Effect,
Remove All, Manage Effects and every effect category, applying the
chosen effect to the selected layers. It is the menu bar's own Effect
menu tree and drawing code; an effect header keeps its own menu.

Test: right_click_in_effect_controls_shows_the_effect_menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dragging Project items onto the Create a new Composition button at the
bottom of the Project panel did nothing. As in After Effects, the
button now takes the drop and runs File > New Comp from Selection with
the dragged items (the selection when the dragged item is in it): one
item becomes a comp of its size, frame rate and duration holding it,
and several open the New Composition from Selection dialog. The button
is outlined while items are dragged over it.

Test: project_items_dropped_on_new_comp_make_a_composition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each layer switch toggled on its own click only, so hiding or locking
many layers took a click per layer. As in After Effects, pressing a
switch in the A/V Features or Switches column now sets it at once, and
dragging up or down gives the same switch of every layer the pointer
passes the state the first one got, whatever their own state was
(rows passed in a quick drag included). The whole drag is one undo
step: layer.setSwitch takes a `merge` key like other gesture edits.
A single click still changes only that layer, so clicking the eye of
one selected layer doesn't change the others (Layer > Switches still
sets all selected layers).

Test: dragging_over_layer_switches_sets_them_all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit 7e4a7cd into main Oct 8, 2026
@bflatastic
bflatastic deleted the fix/227-interface branch October 8, 2026 06:09
bflatastic added a commit that referenced this pull request Oct 9, 2026
As in After Effects, pressing a property's stopwatch toggles it, and
dragging on over the stopwatches above or below gives every property
the pointer passes the state the first one got (animated or not),
whatever its own, in one undo step. Alt+click still adds an
expression.

The gesture is the layer switches' press-and-drag from #238, moved
into `switch_gesture` and shared by both. `prop.toggleAnimation` takes
`merge` so the drag folds into one undo step.

Tests: dragging_over_stopwatches_sets_them_all (ui_timeline_switches),
stopwatch_toggles_with_a_merge_key_are_one_undo_step (engine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant