164 Commits

Author SHA1 Message Date
Philipp Oeser
0bcc088a36 Fix #147934: VSE: Reset retiming never active
Caused by 2b53ed9add

The "is not None" check wasnt not working because it was used against a
boolean.
(Also bring two occasions of the "is_retiming" in sync)

Pull Request: https://projects.blender.org/blender/blender/pulls/147960
2025-10-14 11:48:30 +02:00
Campbell Barton
1216651ca9 PyAPI: make internal modules explicitly "private"
Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.

The following modules have been marked as private:

- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`

Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.

Ref !147773
2025-10-13 09:35:09 +00:00
John Kiril Swenson
99b9f6cafc Fix #147655: VSE: Sequencer scene datablock missing in combined view
UI code forgot to check for `SEQUENCER_PREVIEW` view type.
2025-10-13 00:01:38 +02:00
Damien Picard
227ce1711a Cleanup: Remove unused color balance modifier draw function
Sequencer modifiers are no longer drawn from Python since 866fcd0a09.
The function `draw_color_balance` that draws the Color Balance
modifier is no longer called anywhere, so it can be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/147571
2025-10-09 10:42:22 +02:00
Campbell Barton
cc1a3f19b4 Cleanup: resolve various pylint warnings from recent changes 2025-10-07 10:19:46 +11:00
Richard Antalik
f385327442 VSE: Move Strip properties to Properties editor
Goal of this PR is mainly to improve flexibility and of VSE layout and
screen space efficiency.

Previously, strip properties were displayed in timeline sidebar. This
was limiting, because if you want to display as much properties as
possible, the timeline area had to be taller, but this was at the
expense of space available for preview. However there is plenty of
space in properties editor, which is mostly unused in VSE. Therefore
strip properties were moved to the properties editor.

ID pinning and path displayed in top section aren't drawn, since strip
is not an ID and can not be pinned. Since there is more space for
properties, various panels are changed to be open by default.
Mainly transform and time panels, since they are used often.

There is one minor change: The waveform display property
of sound strip was previously hidden, if timeline area had per strip
waveform display overlay set. This is no longer possible to do and the
property is always visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/140395
2025-10-03 17:33:17 +02:00
Kace
c989add4cd VSE: Sound pitch correction
Add sound pitch correction functionality, so that retimed sound strips
can preserve their original pitch.

This has been implemented as a GSoC 2025 project. Actual pitch
correction is done with Rubberband library, which has been already
included into Blender 5.0 library builds; and then most of the other
code has been in Audaspace, which was already updated within Blender
tree earlier.

So this PR just flips on Rubberband build option, and adds the
checkbox to VSE sound strips for pitch correction (on by default for
newly created sound strips). Pitch correction works with both
simple whole-strip retiming, as well as more complex retiming setups
where different parts of the strip use different speeds.

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/143347
2025-10-03 09:42:48 +02:00
Richard Antalik
698268f927 VSE: Remove transform effect
Functionality has been replaced by strip transform properties. Transform
strips in existing files will be replaced with gaussian blur with radius
of 0 to preserve modifiers and overall strip stack.

Pull Request: https://projects.blender.org/blender/blender/pulls/147003
2025-10-01 13:37:54 +02:00
Brecht Van Lommel
7147227a40 Python API: Make context.tool_settings never null
Since 1122a05cb6 tool settings could return None, but we do not check this
consistently in scripts. Now always return some tool settings, since it's difficult
to verify and easy to forget proper null checks in e.g. operator poll functions.

The sequencer UI code was updated to continue showing tool settings only when
there is a sequencer scene.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146166
2025-09-29 16:54:40 +02:00
Omar Emara
73fcbaf7c4 VSE: Add Compositor modifier
This patch adds a new Compositor modifier that applies a compositing
node group on a sequencer strip. This patch also introduces the concept
of a compositor node tree space subtype, where we now have a Scene and a
Sequencer subtypes. Practically, this just means that node like the
Render Layers node will not be available in the node editor in the
Sequencer subtype.

Future improvements includes:

- The compositor context is recreated on every modifier application,
  while it should ideally be persistent somehow to make use of the
  compositor static cache. This might require work from the compositor
  side by moving the static cache outside of the context and make it
  thread safe if needed. See `Render.compositor` for an example on
  persistent context.
- GPU execution is not supported. This just needs a GPU context to be
  bound before execution, but the tricky part is getting a GPU context.
  See `render::Compositor::execute` for an example on bounding a GPU
  context and why it is less straight forward.
- Node inputs are not exposed on the sequencer modifier interface. An
  approach similar to Geometry Nodes modifier could be used, look at
  `update_input_properties_from_node_tree` for reference, but notice
  that Geometry Nodes naturally exempt the main Geometry socket because
  Geometry inputs can't be exposed, but for the compositor, we will have
  to exempt the main Color and Mask sockets manually. !145971

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139634
2025-09-26 08:40:42 +02:00
Pablo Vazquez
e77261f306 UI: Move Render Preview operators to View menu
Move operators inside the "Render Preview" menu back to the View menu.

This does not include "Render Viewport Keyframes", see #146749

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/146756
2025-09-25 12:24:35 +02:00
Pablo Vazquez
4193cb4f17 UI: Rename animation footers to Playback Controls
Rename the menu item "Footer" in Animation/VSE to "Playback Controls".

This only affects the menu item label under `View`, in the following editors:
* Dope Sheet
* Graph Editor
* NLA Editor
* Sequencer

The name "footer" has issues:

* It's not descriptive of what it does/contains.
* It can be moved to the top, so no longer a footer.
* When used in other editors, it may contain different things so it
  is unexpected what to find in it.

See PR for screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/146727
2025-09-25 12:16:32 +02:00
Falk David
2b53ed9add Fix: VSE: Python errors when no sequencer scene is present
There were multiple places in the UI code that assumed
that the sequencer scene and tool settings exist, when
they might not.
2025-09-23 11:51:54 +02:00
Dalai Felinto
851e5b55af VSE: Story Tools: Add Scene Strip Menu improvements
- Show unassigned scene assets directly under Assets.
- Use Icons for Assets label.
- Only show "Scenes" when there are Assets.
- Don't show scene assets on the "Scenes" list.

The design about changing the operator default behaviour will be
addressed separately. This patch only changes the UI.

Design ref: #145522
Ref: !146574
2025-09-22 17:19:03 +02:00
Pablo Vazquez
fa6be590d9 UI: Move OpenGL render operators to sub-menu
Move 3D Viewport and Sequencer OpenGL render operators into a
"Render Preview" sub-menu.

The goal is to make the operation more clear, and being able to add
new entries to render the active scene or Sequencer scene (handy when
using the new "Sync Scene").

This also reduces the length of the `View` menu which in some cases
can get quite long.

See PR for details and screenshots.

Resolves #146302

Pull Request: https://projects.blender.org/blender/blender/pulls/146316
2025-09-16 10:44:29 +02:00
Damien Picard
eedc381f87 I18n: Disambiguate "Split" in the context of the sequencer
Issue reported by Joan Pujolar.
2025-09-12 18:30:56 +02:00
Philipp Oeser
ed547afcd2 Fix #146045: wrong modifier list in audio strips, crash when selected
8dcd01907d added Video strip modifiers for Audio strips as well, now
corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/146067
2025-09-11 11:31:14 +02:00
Falk David
491a39b0c6 VSE: Strip Modifier Icons
Add missing icons to Video Sequencer modifiers:

- [x] Brightness/Contrast
- [x] Color Balance
- [x] Curves
- [x] Hue Correct
- [x] Mask (uses the existing `MOD_MASK`)
- [x] Tone Map
- [x] White Balance

Co-authored-by: Pablo Vazquez <pablo@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/145739
2025-09-10 19:27:43 +02:00
Falk David
8dcd01907d VSE: UI: New strip modifier "Add" menu
This replaces the "Add modifier" type enum UI with a menu,
similar to the object modifiers "Add modifier" menu.

The "Copy to Selected Strips" operator was a bit out of place
and already exists in the "Strip" menu.
Togther with the "Add" menu, these are now moved into a
"Modifiers" submenu, similar to the "Objects" > "Modifiers" menu.

Also updated for the strip context menu (right-click).

Pull Request: https://projects.blender.org/blender/blender/pulls/145981
2025-09-09 16:00:50 +02:00
Falk David
866fcd0a09 VSE: Update Strip Modifier UI
This PR updates the VSE strip modifiers interface.
It now uses the same design as the object modifiers.

Changes:

* Except for the "Mask Input" subpanel, the modifier UIs are unchanged.
* Modifiers can now be rearranged using drag & drop.
* Additionally, there is now an active strip modifier. This is exposed
   though python via `strip.modifiers.active`.

This is in part for !139634 which needs the concept of an active modifier.

Notes:

* The `modifier.cc` file included all the implementation of all modifiers.
   With the addition of a another new callback in this PR, this file was
   getting quite big so I split everything out into individual files for all
  modifiers. The modifiers are getting registered at launch.
* The modifier panels are getting added using a UI template
  (`template_strip_modifiers`) very similar to the object modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/145367
2025-09-04 15:01:57 +02:00
John Kiril Swenson
a4b7b7ed3b Fix: VSE: Mirror operations invoking instead of immediately executing
Mirror menu added in #142506 forgot to account for this case.
To fix, ensure that only interactive mirror invokes.
2025-09-04 01:00:20 +02:00
Christoph Lendenfeld
49d3d29355 UI: move playhead snapping to footer
This patch moves the playhead snapping UI element to the
new footer introduced with 35bcbad7e9
This is in preparation for removing the timeline editor, see #131102

Pull Request: https://projects.blender.org/blender/blender/pulls/144922
2025-09-02 12:22:29 +02:00
Campbell Barton
39ab4fe0ee Cleanup: remove duplicate import 2025-08-29 11:24:54 +10:00
John Kiril Swenson
7bd19f7efb Fix: VSE: Various crashes when sequencer scene is not initialized
Most of these crashes happen because it is assumed that the scene will
always be present even if we have an uninitialized `Editing`, which is
no longer the case with #140271.

- Fix crash when clicking and dragging in the scrub area by checking for
  valid `sequencer_scene` in `change_frame_poll`
- Fix crashes when selecting menu items by disabling them in the UI
  until a `sequencer_scene` is present
- Fix crashes running operators from the F3 menu by changing to more
  restrictive polls that check for `sequencer_scene`
- For good measure, check before dereferencing in
  `channels_displayed_get`, `active_seqbase_get`, and `editing_get`

Pull Request: https://projects.blender.org/blender/blender/pulls/145145
2025-08-26 11:53:49 +02:00
Ramon Klauck
51db471491 VSE: show shortcuts in strip animation menu
This PR makes that the user sees the shortcuts for the operators in the
strip animation menu. This is done by setting the right operator
context.

Pull Request: https://projects.blender.org/blender/blender/pulls/143210
2025-08-25 22:02:39 +02:00
Falk David
1122a05cb6 VSE: Scene Selector & Scene Time Synchronization
Implements the proposed design (with some modifications) in #135058.

## Sequencer Scene

This adds a new property called `sequencer_scene` to workspaces. This scene is used
by the video sequence editors in the current workspace for their context.
This is a first step towards "detaching" the VSE from the active scene in the window.

Each sequencer timeline editor shows the sequencer scene that is being used.
By default, when no sequencer scene is selected, the timeline and preview are empty.

Pressing the "new" button will add a new scene and assign it to the sequencer
scene for the current workspace.

## Contextual Playback

Pressing `Space` (by default) for starting the animation playback is now contextual:
depending on the context (where your mouse cursor is), the scene that is played back
might be different. E.g. with a 3D Viewport and a Sequencer open, pressing "play"
in the 3D Viewport will play the _active scene_ of the window, while pressing "play"
in the sequencer will play the _sequencer scene_.

## Time & Scene Synchronization

Additionally, this adds a toggle called "Sync Active Scene".
With the property turned on, the active scene & scene time in the window will be
synced with the time & scene of the current scene strip in the sequencer.

Note that this is _not_ bi-directional. The sequencer can change the active scene
and map time, but it's not possible the other way around since it one can have
multiple strips using the same scene (+camera, and even time!).

Currently this setting is exposed in the footer of the sequencer timeline as well
as in the workspace settings.

This allows for one of the core concepts that the story tools projects aims at: Working
in a scene (e.g. in the 3D viewport) while also working with the edit
(in the sequencer timeline).

## Some technical notes

* Undoing while playback is running will now cancel playback. This is to avoid the timer,
   that points to the scene and viewlayer that are playing, to get de-synced after loading
   the memfile undo step.
* When the sequencer scene is not the same as the active scene, we ensure it has
   a depsgraph.
* Normally, when a `NC_SCENE` notifier points to a specific scene, the notifier is dropped
   if that scene doesn't match the active one in the window. We now also check that it
   doesn't match the sequencer scene in the active workspace.
* When loading older files, we need to make sure that the active workspace in a window
   uses the active scene as the sequencer scene. This is to make sure that the file opens with
   the same sequences open.
* Tool settings are stored per scene. To make sure the sequencer uses the tool settings for
   the sequencer scene, the "context.tool_settings" and `CTX_data_tool_settings` members
   are overridden in the sequence editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/140271
2025-08-25 11:58:17 +02:00
Aras Pranckevicius
334a66bf93 Fix: VSE preview display channel / overexposed fields wrongly disabled
When proxy render size was set to Scene or None, the UI wrongly
disabled more following UI fields, instead of just the "use proxies"
field.

Pull Request: https://projects.blender.org/blender/blender/pulls/144988
2025-08-23 08:04:47 +02:00
Ramon Klauck
5dc5bd5a2b VSE: Add "Mirror" menu to preview strip menu
This PR adds a "Mirror" menu to the Strip menu within the VSE preview.
This menu is similar to the "Mirror" menu in the view3d "Object" menu.
It allows the user to access the mirror operator through a menu, rather
than via a shortcut.

Pull Request: https://projects.blender.org/blender/blender/pulls/142506
2025-08-17 14:01:40 +02:00
Ramon Klauck
d388b807a3 VSE: Clear Strip Keyframes from Preview
This PR makes it easier to clear keyframes from strips in preview.
It is the similar to the feature in 3D viewport. Just navigate to
"Strip" -> "Animation" -> "Clear Keyframes...". This then deletes
all keyframes form the selected strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/141106
2025-08-15 05:37:39 +02:00
Falk David
2f852d4f00 VSE: Add scene assets through strip add menu
Adds scene assets (including the catalogue tree) to the `Add` > `Scene` menu.

When selecting a scene asset, the asset import setting is used:
* Link: Scene is linked (cannot be edited, but will be used by the strip)
* Append: Appends the full scene including all IDs to the file.
* Append/Reuse: Appends the scene but will reuse IDs (like mesh data, materials, etc.).
   Objects, collections, and the scene itself are not reused.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/141213
2025-08-13 13:11:47 +02:00
Ramon Klauck
1a9817cdca VSE: add copy and paste operators to preview keymap
This feature allows the user to use `ctrl + C`, `ctrl + V` and
`ctrl + shift + V` directly in the sequencer preview. It adds these
operators also to the preview Strip menu.

It works the same as in the sequencer timeline.

Pull Request: https://projects.blender.org/blender/blender/pulls/143371
2025-08-11 21:40:04 +02:00
Falk David
6eea75e928 VSE: "Duplicate Strips" also duplicates referenced IDs
Duplicating a strip that references an ID like the scene strip would not
duplicate the scene. This is wanted in some workflows.

To align with the rest of Blender, this changes the behavior for how
strips are duplicated:
* `Shift + D` ("duplicate"): Duplicate the strip and also duplicate the
   IDs referenced by the strip. Currently this only affects `Scene`,
   `MovieClip`, and `Mask` strips.
* `Alt + D` ("duplicate linked"): Duplicate the strip, but reference the
  same IDs. This is the current behavior in `main`.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/144138
2025-08-11 15:20:35 +02:00
Falk David
816da3c63b VSE: Copy settings of active scene when adding new scene
The `Add` > `Scene` > `New Scene` operator was behaving as follows:
* If there is no active scene strip, create an empty blank scene and
   assign it to a new scene strip.
* Otherwise, use the scene referenced by the active scene strip and
  use one of the copy scene methods (blank, copy settings, copy linked,
  or full copy) to create a new scene and assign it to a
  new scene strip.

This was not ideal for 2 reasons:
1. With no strip selected, creating blank scenes is generally not very
   useful as it means that the user has to e.g. update all the render
   settings, add a camera, etc.
2. The behavior of copying an existing scene by using the active strip
   is very hidden. Also because adding the strip immedialty calls the
   move operator, so you cannot even adjust the copy method of the
   scene.

This PR changes 3 things:
1. Don't use at the active scene strip. Instead use the active scene.
2. Don't create an empty blank scene, copy the settings of the active
   scene by default. This means that e.g. render settings can be reused.
 3. The operator entry in the `Add` > `Scene` menu is now called `Empty Scene`.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/144069
2025-08-08 10:50:58 +02:00
Christoph Lendenfeld
befe6062c0 UI: Icons for playhead snapping
The recently introduced feature of playhead snapping (#137278)
added a popover menu for snap targets.
This used text to indicate the contents of said popover.
In order to bring it in line with the other snapping menu, this PR adds
icons to indicate the enabled state of snapping.

Part of #135794

Pull Request: https://projects.blender.org/blender/blender/pulls/139271
2025-08-05 09:01:56 +02:00
Ramon Klauck
efef8a201a VSE: delete keyframes from preview
This PR makes it easier to delete strip keyframes from the preview.
It works similarly to the 3D viewport and also works with keying sets.
Pressing "alt + I" deletes the keyframe on the current frame of the
selected strips, when a keyset is active it only deletes the keyframes
of the selected keyset.

Pull Request: https://projects.blender.org/blender/blender/pulls/140385
2025-08-04 19:15:00 +02:00
Richard Antalik
555b22b194 Merge branch 'blender-v4.5-release' 2025-07-05 01:36:49 +02:00
Richard Antalik
59173b6f92 Fix #141399: Operator search throws error in empty VSE
Python AttributeError was thrown, because `strip.type` was accessed, while
`strip` was `None`.

Pull Request: https://projects.blender.org/blender/blender/pulls/141421
2025-07-05 01:34:24 +02:00
Aras Pranckevicius
293cdac6ab Merge branch 'blender-v4.5-release' 2025-07-01 11:53:30 +03:00
Damien Picard
860b632670 I18n: Translate "MB" (megabyte)
In some languages, MB uses a different symbol (Mo in French for
mégaoctet).

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00
Bastien Montagne
3bb53a27bb Merge branch 'blender-v4.5-release' 2025-06-30 11:21:59 +02:00
Damien Picard
33f31f1842 I18n: Translate a few messages
I18n: Translate a few messages

- Translate add-on types in the user preferences.
- Translate a report which uses formatting.
- Do not translate scene names in `sequencer.scene_strip_add` operator
  UI.
- Do translate the type of new scene in
  `sequencer.scene_strip_add_new` operator.
- Translate Half and Float image format color depth enum items.
- Translate Mix node header with non-color data types.
- Translate sequencer modifiers' names if data translation is enabled.

Most issues reported by Ye Gui in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/141145
2025-06-30 11:12:48 +02:00
Damien Picard
afa51a5d54 I18n: Disambiguate "Mirror"
"Mirror" can mean:
- To symmetrize something (i.e. generate a new mirrored copy of it or
  edit it in a symmetric fashion).
- To flip something (i.e. invert its values along X, Y or Z axes).
- To repeat a texture in a mirrored fashion outside its bounds.

Reported by Gabriel Gazzán in #43295.
2025-06-30 11:07:39 +02:00
Ramon Klauck
53578d33ae VSE: Keyframing in Preview
This PR makes it easier to add keyframes for strips in preview.
This works same way as in 3D viewport, using keying sets. Pressing I
key adds keyframe to default keying set, pressing K dhows menu with
available keying sets. For VSE, location, rotation and scale properties
are available for now. Other existing keying sets are not valid for
VSE.

Deleting keyframes and potentially adding more keying sets will be
handled in separate PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/140107
2025-06-25 02:56:55 +02:00
John Kiril Swenson
68b35b3ee0 Merge branch 'blender-v4.5-release' 2025-06-20 17:05:07 -05:00
John Kiril Swenson
083cbe202a Fix: VSE: Runtime error for change effect menu on non-effects
The "change" menu (accessible through C) would spit out an
error if hovering over the "Change effect type" menu when the
active strip was not an effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/140692
2025-06-20 23:55:59 +02:00
Pablo Vazquez
35bcbad7e9 UI: Add Footer to Animation & VSE Editors
Add a footer region which contains essentially the playback and frame
range buttons from the Timeline Editor, to the following editors:
- Dope Sheet
- Graph
- NLA
- Sequencer

Available in the View menu in each editor, hidden by default.

The motivation is to provide a convenient way to access these
often used controls, and in the near future adjust these footers
to add more playback functionality related to each editor.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/135697
2025-06-19 15:54:53 +02:00
Sebastian Parborg
5bd03f3618 VSE: Move the seq prefetch setting to the cache tab and turn on per default 2025-06-13 11:12:34 +02:00
John Kiril Swenson
82d20f6a22 Fix: VSE: Remove Playhead Snapping menu from Preview
The other snapping menu in the preview is specific to that view type,
so it doesn't really make sense to have a timeline-specific snap
mode listed here.

Pull Request: https://projects.blender.org/blender/blender/pulls/140171
2025-06-11 03:57:25 +02:00
Campbell Barton
0cbcf48e69 Cleanup: move PlayheadSnappingPanel out of tool-system module
This panel is unrelated to the tool-system.
2025-06-01 15:11:51 +10:00
John Kiril Swenson
0f37863fba Cleanup: VSE: Replace redundant "Change Effect Input" with "Swap Inputs"
The `SEQUENCER_OT_change_effect_input` operator does exactly the same thing
as `SEQUENCER_OT_swap_inputs` . "Change effect input" in the
"Effect Strip" context menu also seems bugged in recent versions.

Since "Swap Inputs" already has a keybind and the name itself is closer
to its intended use, just use that operator over the other one.

Also poll "Swap Inputs" so it is grayed out if the effect does not take
two inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139615
2025-05-30 23:28:06 +02:00