Commit graph

42 commits

Author SHA1 Message Date
Cyloci
675d94bd4b Anim: Optional wrapping for timeline navigation
Add the option to make various timeline navitagion operators wrap the
scene/playback range.

The wrapping occurs when:

- jumping 1 frame
- jumping a delta of frames
- jumping between keyframes
- jumping between markers

The wrapping ignores frames/markers outside the playback range.

If the Preview Range is active the wrapping will limit to that range
instead.

This is managed via a playback setting on the Scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/161367
2026-08-11 10:38:05 +02:00
Christoph Lendenfeld
4bdfb6df7a UI: Bring Time jump buttons inline with playback buttons
Reorders the playback buttons to all be inlined

Changes split off from !161367
for which we need the dropdown to be useful for all playback buttons.

alternative to !162070

Pull Request: https://projects.blender.org/blender/blender/pulls/162255
2026-08-04 08:07:48 +02:00
Nika Kutsniashvili
2664811a96 UI: Reorganize Playback popover
"Playback" popover was getting too large with new additions coming in
frequently, and most of the vertical space was taken up by the least
useful options.

This PR groups settings in the popover in different subpanels and
closes one by default to save on real estate.

In the Sequencer editor, an additional subpanel appears.
"Sync Scene Time" setting, which was sitting in the footer, exposed,
was moved here.

Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/161508
2026-07-27 18:13:05 +02:00
Pablo Vazquez
24ae1c8d73 UI: Anim: Unify Keying options in Playback Controls
Playback controls can get cropped in small screens/editors. This is an
effort to unify some controls, starting with keying settings.

At the moment, keyframing options are in a "Keying" popover, and the
Auto-Keying popover. This PR combines them both to gain space in the
playback controls region.

See !160560 for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/160560
2026-07-20 18:44:17 +02:00
Pablo Vazquez
b921240158 Merge branch 'blender-v5.2-release' 2026-06-18 11:41:49 +02:00
Sybren A. Stüvel
4db30c1c78 Fix: Animation playback buttons get confused when mouse is not moved
Fix an issue where repeated clicks on the 'Reverse Playback' button
could actually trigger normal playback instead.

This also introduces a new operator `screen.animation_pause`, which
always ensures animation playback is paused (regardless of whether it is
currently playing). Before, the Pause button used the
`screen.animation_play` operator, which toggles playing/paused state.

The bug was caused by a few connected parts:

- The active button under the mouse is stored & restored between
  redraws, so that the correct button is kept highlighted (among other
  things). This storing & restoring is done based on the operator's
  idname.
- Since during playback the "Pause" button takes the place of the
  "Reverse Playback" and "Normal Playback" buttons, and before this fix
  these were all three the same operator, Blender would get confused and
  mark the wrong button as the active one, triggering the normal
  playback instead of the reverse.

The conditions:
- Set the Playback Loop Mode to Stop at End.
- Don't move the mouse while going through these steps.
- Click 'Reverse Playback'.
- The playback buttons are replaced with a big 'Pause' button.
- When playback stops, the 'Pause' button is replaced again with the
  'Reverse'/'Normal' buttons.
- Clicking 'Reverse Playback' button would now trigger the normal
  playback.

This is resolved by making the 'Pause' button its own operator, and by
emitting a fake mouse movement event whenever playback is
started/stopped. Both are necessary for this fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/160242
2026-06-18 11:05:28 +02:00
Eitan Traurig
b207b277e3 UI: Add missing delete and duplicate icons
- Add Duplicate and Delete icons
- Reorder Delete by moving to the bottom

Pull Request: https://projects.blender.org/blender/blender/pulls/159814
2026-06-13 13:07:58 +02:00
Pratik Borhade
1de9c374c3 UI: Add Scrubbing Region
This patch adds a new region type for scrubbing the entire playback
range. For now, it is only drawn on top of the VSE preview playback
controls footer (as part of the three point editing / Media Bin
project), but the `RGN_TYPE_SCRUBBING` region type is general
enough to be reused elsewhere.

To allow pulling up/down the VSE preview scrub region along with the
playback controls footer in one click-drag movement, a new
`RGN_STACK_ON_PREV` alignment option is added, which forwards drags
from/to the previous region when reaching maximum sizes.

Original design task ref: #155275

Pull Request: https://projects.blender.org/blender/blender/pulls/155377
2026-05-14 21:39:11 +02:00
Damien Picard
a1365eb322 UI: Fix spelling for a few messages
- Replace "Don't" with "Do not", as per style guidelines
- Remove redundant texts from layout props
  "Sync Scene Time" is already the name of the prop, there is no need to
  specify it explicitly in the UI.
- "Add Ico Cube" -> Ico Sphere: likely a copy-paste mistake, not sure
  what an ico cube is.
- Add accent to "Bézier", since it is a proper name.
- "Project vertices both along along...": duplicated word.

Pull Request: https://projects.blender.org/blender/blender/pulls/156478
2026-03-28 16:37:49 +01:00
Christoph Lendenfeld
511bb630c1 Anim: Explicit option to allow preroll
This adds an explicit option to allow preroll.
When enabled this allows playback of frames before the current
playback range. Before in this case depends on the playback direction.

The issue this addresses is that previously the playhead would snap into
the playback range when you start playing back, but you could still
scrub outside the playback range while playing back.

To simplify the explanation I will ignore playing in reverse here. It
works just the same but with the boundary conditions flipped.

Now with the option enabled:
* playing back from before the playback range start is allowed.
* scrubbing to a frame before the playback range is allowed.

With the option disabled:
* playing back from outside the playback range will always snap to the
range start frame
* scrubbing to a frame outside the playback range will always snap to
the range start frame

The option is disabled by default.

Fixes #147032

Discussed in animation & rigging module meetings [1][2]

[1] https://devtalk.blender.org/t/2025-02-27-animation-rigging-module-meeting/39267#p-148872-playback-behavior-with-scene-frame-range-5
[2] https://devtalk.blender.org/t/2025-03-06-animation-rigging-module-meeting/39434?u=nickberckley

Pull Request: https://projects.blender.org/blender/blender/pulls/154757
2026-03-18 09:03:41 +01:00
Sybren A. Stüvel
24f8c40b03 Anim: add loop modes to the playback popover
Add the following "Playback Loop Modes" to the scene's playback
options. These are described for forward playback; swap "start" and
"end" frame when in reverse.

- Infinite: default behaviour, after the last frame loop back to the
  first and continue playback.
- Stop at End Frame: stop playback at the last frame.
- Stop at Start Frame: after reaching the last frame, stop playback
  and go to the first frame.
- Restore Frame: after reaching the last frame, stop playback and go
  to the frame playback started from (as if pressing Escape).
- Bounce: after reaching the last frame, reverse playback.

These also take the preview range into account, if it's active.

This adds the RNA property `Scene.playback_loop_mode`.

Co-authored by: Loïc DAUTRY <lauloque@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/154987
2026-03-03 14:55:02 +01:00
Falk David
a783ad692b Fix #150122: VSE: Playback controls in preview use active scene context
The `playback_controls` function was checking for the `view_type` to
change the scene context for the sequencer. But this should be done
for any of the `view_type`s so the fix removes that part of the
condition.

This means that the scene syncing will show up in all views, but that's
probably better anyway and more consistent.

Pull Request: https://projects.blender.org/blender/blender/pulls/150279
2025-11-21 10:02:41 +01:00
Nika Kutsniashvili
294af10632 Fix: Time jump operator doesn't work from the Sequencer
After #148751 noticed that time jump operator had the same problem,
so I applied the same fix. Works well now.

Since operator uses scene level settings, menu displays sequencer scene
settings in sequencer, and operator also uses them.
In practice, this means users can/will have different settings in sequencer,
and in other editors. It's not ideal, but has no simple solution until there
are file-level settings.

This PR also hides playback buttons and other UI elements in Sequencer
footer if it has no scene, because animation can't be played there.

Pull Request: https://projects.blender.org/blender/blender/pulls/149117
2025-11-03 12:55:30 +01:00
Jonas Holzman
c36a46203c Fix: UI: VSE Playback control un-centered when no active sequencer scene
The right side separator was only present when an active sequencer scene
was linked, causing the playback control to be justified to the right
side instead of the center. Fixed by making the separator always
present.

Pull Request: https://projects.blender.org/blender/blender/pulls/149239
2025-11-03 09:17:39 +01:00
Sybren A. Stüvel
5836f48ce7 Anim: Bring back Timeline as mode of the Dope Sheet
Bring back the Timeline editor, as a sub-type of the Dope Sheet
editor. Effectively this reverts 2ae953d7f5, but in a way
that still doesn't undo everything. The changes are:

- Regions that should be hidden in the Timeline (N-panel, footer) are
  now managed by their poll functions. Earlier, when switching between
  Dope Sheet and Timeline, Blender would simply overwrite user-chosen
  visibility flags; this no longer happens.
- Defaults are set better, when an editor is switched to Timeline or
  Dope Sheet for the first time. This used to not be the case, and was
  manually configured in the startup file (but subsequently created
  editors did not adhere to this):
    - Timeline: channel box is hidden (but can be opened), the Summary
      line s collapsed so that only a single line is visible.
    - Dope Sheet: channel box is shown, Summary line is expanded,
      N-panel is shown.
- Filtering by type (so whether Scene, World, Material, Object etc.
  animation is shown) was 'leaking' from the Dope Sheet into the
  Timeline editor (once set in the Dope Sheet, the Timeline would
  still adhere to them, even though there are no visible controls to
  edit those filters). This is now fixed, so that the Timeline always
  has a hard-coded set of filters.
- The "Keying" menu has been removed from the Timeline header. The new
  additions to the header in 5.0 take up more space. This menu now is
  labeled after the chosen keying set, which can get quite long, so
  it's fighting for this space. Furthermore, the menu is seen as
  "animator feature", so it is now "only" available in the footer of
  every animation editor except the Timeline.

Pull Request: https://projects.blender.org/blender/blender/pulls/148278
2025-10-20 17:40:26 +02:00
Nika Kutsniashvili
f145e1f7e2 Anim: Time jump operator
Adds a new operator that jumps time by a given number of frames or seconds, forward or backward.
Surprisingly, it was lacking in Blender, and prompted many users (including me) to create extensions.

This PR adds two properties: `time_jump_unit` for choosing whether to jump by frames or seconds
and `time_jump_delta` property that defines by how many frames or seconds the operator should jump,
as well as an actual operator that changes the current frame (`screen.time_jump`).

`time_jump_delta` is a float that gives users the ability to jump by half a second, for example, or by subframes.
Default is set to 1 second, which translates to as many frames jump as frame rate / frame base.
The operator is intentionally not bound by frame range, and can go in negative frames as well.
This is very important because it's extremely common to set frame range to the current workload,
but wish to see animation beyond that.

Operators are added in the new footer for animation editors alongside with pop-up menu where
properties can be changed.

Shortcuts are also added: Ctrl+Left/Right Arrow, which was surprisingly free in Blender.
Now timeline controls are:
- **Right Arrow**: Next Frame
- **Ctrl + Right Arrow**: Jump Forward (by default also Next Second)
- **Shift + Right Arrow**: Jump to End

Pull Request: https://projects.blender.org/blender/blender/pulls/140677
2025-10-07 13:43:20 +02:00
Campbell Barton
cc1a3f19b4 Cleanup: resolve various pylint warnings from recent changes 2025-10-07 10:19:46 +11:00
Christoph Lendenfeld
2ae953d7f5 UI: remove the Timeline
This adds versioning code that replaces any timeline with a
dopesheet where the footer is shown, AND it removes the
timeline from the menu options.

If the area is too small to show both, the footer and the
header then only the footer is shown.
This assumes that users created the small timeline
just for the playback controls

Any uses of `SACTCONT_TIMELINE` (except for versioning) have been removed.

part of #145577

Pull Request: https://projects.blender.org/blender/blender/pulls/147058
2025-10-02 09:44:53 +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
Damien Picard
417792f7fe I18n: Define NO_TRANSLATION ("Do not translate") context
This new translation context is for some special cases when
translation cannot be avoided, for example in an interface where some
props are built-in (translatable) and others are
user-defined (non-translatable), but we don't know which ones in
advance.

It allows specifying explicitly that translation should not occur
for user data when building the UI.

It is a followup to !145963, in which the context was introduced as a
string literal instead of a defined context.
2025-09-29 11:07:03 +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
Pablo Vazquez
535c25800b UI: Timeline: Improve Keying popover label
Display the active keying set name as label, and an icon to indicate
the current keyframe type.

This also adds a descripition/tooltip to the keying popover, so it's
easier to understand when the keying set name is not clear.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/145963
2025-09-11 14:43:42 +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
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
Pablo Vazquez
e431145e4a Fix: Graph: Do not use deprecated op in footer
The graph.keyframe_jump operator is deprecated. Use the regular
screen.keyframe_jump operator that was recently fixed to work in all
animation editors.
2025-06-27 12:42:00 +02:00
Pablo Vazquez
a90ce938dd UI: Dope Sheet: Add Cache visualization
Add cache visualization to the Dope Sheet editor, previously limited to
just the Timeline.

See PR for details and screenshots.

Part of #131102

Pull Request: https://projects.blender.org/blender/blender/pulls/140966
2025-06-27 12:23:48 +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
Sybren A. Stüvel
95966813ae Anim: add 'Frame Scene/Preview Range' to animation editors
blah

Add a new operator 'Frame Scene Range' to the Dope Sheet, Graph Editor,
NLA, and VSE 'view' menus. It is added both to the regular menu and the
pie menu (by default on the ` hotkey).

The operator will only change the horizontal view, to show the scene
range or the preview range, depending on whether the preview range is
active or not.

The label of the operator switches between "Frame Scene Range" and
"Frame Preview Range" to indicate what will happen.

For the VSE this operator is quite similar to the 'Frame All', as that
by default also frames the scene range. There are a few notable
differences though:

- Frame All includes any strip that extends beyond the scene end frame.
- Frame All ignores the preview range.

Pull Request: https://projects.blender.org/blender/blender/pulls/122311
2024-05-30 17:19:10 +02:00
Philipp Oeser
0b30cb1929 UI: Clarify Playback "Play In" option
The "Play In" > "Properties Editor" option is not only updating Property
Editors but also the sidebars of other editors (such as the 3DView).

This caused a bit of confusion since we also have "Play In" > "3D
Viewport" (which only updates the 3DView main region but not the
sidebar)

So now call the option "Properties and Sidebars" in the UI ("Editor" has
been stripped to fit the text - but also since the editor is usually
only called "Properties" e.g. in the editor dropdown).

Came up in #120012

Pull Request: https://projects.blender.org/blender/blender/pulls/120305
2024-04-05 18:17:41 +02:00
Sergey Sharybin
74d948097f Merge branch 'blender-v4.1-release' 2024-03-14 17:11:45 +01:00
Harley Acheson
a1fcdf10f2 UI: Timeline Playback Popup Too Narrow
With default sizes the Timeline "Playback" popover clips the text of
two items in English. This PR just makes it just wide enough plus a
bit of breathing room.

Pull Request: https://projects.blender.org/blender/blender/pulls/119474
2024-03-14 17:10:34 +01:00
Campbell Barton
cf1ab3ec6e Cleanup: consistent quotes in Python 2024-03-14 10:38:45 +11:00
Nika Kutsniashvili
f2c8f31a3c UI: Add 'Channels' region toggle in animation editors
This way users can also assign shortcut to it or add it to quick favourites.

Pull Request: https://projects.blender.org/blender/blender/pulls/117837
2024-02-05 12:13:31 +01:00
Nika Kutsniashvili
5a0b50e0a6 Anim: Reorganize items in 'View' menus in animation and video editors
View menu in animation and video editors are too
different from each other and unorganized.
Same operators appear in different places in different editors.
That makes navigating them harder, because for example
you expect framing operators at the bottom because they're
at the bottom in graph editor, but they're at the top in Sequencer
and 3D Viewport. It's important that ordering of operators
match as well as possible, so that users can expect certain
operators in certain places and dont spend time searching
for buttons in messy menus.

I tried to match ordering to 3D viewport menu
as much as possible, and also to use separators right,
so that grouping of items is logical and can be shareable between editors.

This grouping also looks better and makes navigation easier,
because it splits huge pile of toggles at the top of the menus
in smaller chunks and puts operators between them,
so they're esier to separate them in one glance.

Split off from #116492

Pull Request: https://projects.blender.org/blender/blender/pulls/117162
2024-01-23 12:11:22 +01:00
Campbell Barton
d068407a00 Fix #114801: Scene.use_audio value flipped
Regression in [0] caused the value to be flipped.

[0]: e37dc17991
2024-01-18 11:01:13 +11:00
Harley Acheson
7833703603 UI: Reverse Order of Timeline Menu Items
Reverse the order of items in the Timeline "View" and "Marker" menus.
These menus assume reversed order since this editor is usually at the
bottom. This change will keep them as expected after #109798.

Pull Request: https://projects.blender.org/blender/blender/pulls/111758
2023-08-31 20:25:35 +02:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Philipp Oeser
9511384442 Fix: editor naming in recent spreadsheet animation update commit
Followup to adb36b89c7.

"Spreadsheet Editors" > "Spreadsheet" (as this is what the spreadsheet
is called e.g. in the Editor type dropdown).

Pull Request: https://projects.blender.org/blender/blender/pulls/108186
2023-05-24 09:25:10 +02:00
Philipp Oeser
adb36b89c7 Fix #107988: Spreadsheet not updating when playing animation
Similar to other screen options, add one for Spreadsheet editors that
makes them update when playing animation.

NOTE: there are some editors that always update when playback was
invoked from an animation editor while others only do this when their
respective option is specifically set (think the later behavior fits the
spreadsheet better).

Pull Request: #108002
2023-05-22 15:15:22 +02:00
Hans Goudey
ee08b2ddff Geometry Nodes: Add display toggle for simulation cache in timeline
Similar to the existing options for toggling physics cache display.
2023-05-12 13:48:52 -04:00
Sergey Sharybin
03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00
Renamed from release/scripts/startup/bl_ui/space_time.py (Browse further)