Skip to content

Bring the clip menu's Motion, Look, Speed and Waveform presets to the CLI - #6218

Merged
jonoomph merged 1 commit into
developfrom
cli-clip-actions
Oct 21, 2026
Merged

jonoomph merged 1 commit into
developfrom
cli-clip-actions

Conversation

@jonoomph

Copy link
Copy Markdown
Member

The timeline's right-click menu has lots of handy one-click presets, but the CLI couldn't reach most of them. This PR lets the CLI use them, running the exact same code as the menu, so a preset looks the same whether you click it or script it.

New clip commands

  • clip motion ID --preset NAME: every Motion preset (slides, wipes, bounces, pop, spiral, emphasis, camera zoom/pan/Ken Burns, credits, or none). --at sets where emphasis presets start, in place of the playhead.
  • clip look ID --effect EFFECT --preset NAME: Color, Film Grain, Analog Tape, Sharpen, Blur, Shadow and Glow presets. none removes an effect, and --effect all --preset none resets the look.
  • clip speed ID --mode ...: speed up or slow down (--factor), reverse, freeze or freeze-and-zoom (--at, --duration), and reset.
  • clip repeat ID --passes N: loop or ping-pong repeats, with the same options as the Custom Repeat dialog.
  • clip waveform ID [--hide]: show or hide a clip's waveform. This works in headless sessions too.

Each command is one undo step, lists its presets in its help, and works inside edit apply and edit bulk. clip help also points to the existing commands that cover rotate, layout, crop and trimming.

Shared code, less duplication

  • The Motion, Look and Speed logic moved out of timeline.py into shared helpers: windows/views/motion.py, classes/look_presets.py, and apply_time_action in retime.py. The menu and the CLI both call them. This removes about 1,000 lines from timeline.py.
  • color_presets.py now loads libopenshot only when a preset is applied, so CLI help still starts without libopenshot or Qt.

Docs: a short "Clip menu presets" section in doc/agent_cli.rst.

…eform presets

Add clip motion, look, speed, repeat and waveform commands that run the
same preset logic as the timeline context menu. Move that logic out of
TimelineView into shared helpers (windows/views/motion.py,
classes/look_presets.py, apply_time_action in retime.py, keyframe point
helpers in keyframe_editing.py) so the GUI and CLI share one
implementation. Each command is one undo step and works in edit
apply/bulk batches. Waveforms are generated synchronously from the
timeline snapshot code, so they also work in headless sessions.
@jonoomph

Copy link
Copy Markdown
Member Author

@jonoomph
jonoomph merged commit 97d658b into develop Oct 21, 2026
26 checks passed
@jonoomph
jonoomph deleted the cli-clip-actions branch October 21, 2026 17:28
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