Repository navigation
Bring the clip menu's Motion, Look, Speed and Waveform presets to the CLI - #6218
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
clipcommandsclip motion ID --preset NAME: every Motion preset (slides, wipes, bounces, pop, spiral, emphasis, camera zoom/pan/Ken Burns, credits, ornone).--atsets 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.noneremoves an effect, and--effect all --preset noneresets 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 applyandedit bulk.clip helpalso points to the existing commands that cover rotate, layout, crop and trimming.Shared code, less duplication
timeline.pyinto shared helpers:windows/views/motion.py,classes/look_presets.py, andapply_time_actioninretime.py. The menu and the CLI both call them. This removes about 1,000 lines fromtimeline.py.color_presets.pynow 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.