27 Commits

Author SHA1 Message Date
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