Three small changes that improve the Replace Action UI:
- Add "..." to the label in the menus, to indicate there will be a
popup.
- If the old or new Action cannot be found, show the Action names
without the `AC` ID type prefix.
- If the old and new Action are the same, show "Cannot replace Action
with itself" instead of the more cryptic "Invalid old/new Action
pair".
Pull Request: https://projects.blender.org/blender/blender/pulls/163959
This adds the `UILayout::property_split_factor` property which contains
the split factor used in the layout system, and avoids to use the this
as raw value all over the place.
Pull Request: https://projects.blender.org/blender/blender/pulls/163393
Add a new operator `Replace with duplicate Action`.
Similar to `Replace with new Action` this looks at the action
of the active object and replaces all users of that action with
a duplicate.
Pull Request: https://projects.blender.org/blender/blender/pulls/158258
This patch adds support for frame animation playback caching in the
compositor. There is now a Frame Cache option in the side bar, when
enabled, the compositor will cache its final viewer result across
frames. The cache is drawn in the timeline editor with a new display
option for that cache. The cache is invalidated on any change that
affects the node tree. The cache respects the memory cache limit and
will evict cached frames in the limit was surpassed. This caching
mechanism only concerns the interactive compositor, not the viewport
compositor or the VSE compositors.
A few changes were made to support this patch:
- A new DEG_id_is_user_modified query function was added to detect if an
ID changed due to user input or not. This is used to do proper cached
invalidation. Thanks to Brecht for the implementation.
- The compositor job now internally suspends animation playback until
the compositor is done to make sure the entire frame range is computed
and cached. The previous behavior of frame dropping can still be
achieved using the playback frame dropping option.
Pull Request: https://projects.blender.org/blender/blender/pulls/159902
Add an operator to remove F-Curve modifiers, either all or limited by
a few criteria. By default, all are removed. The 'Adjust Last
Operation' (Redo) panel can be used to choose differently.
- **All**: remove all the f-modifiers
- **First**: only remove the first f-modifier
- **Type**: the user can specify what type they want to remove, and
all of those types are removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/156847
No functional changes.
This changes the ordering of the "Key" menu in the Dope Sheet to be
consistent with the Graph Editor.
It also modifies the text "Jump to Keyframes" to "Jump to Selected".
Pull Request: https://projects.blender.org/blender/blender/pulls/157633
This patch adds a new operator to replace all uses
of a given animation with a newly created one.
The operator can be found just below the "Replace Action" operator
in the Action editor (Action dropdown) and in the 3D viewport
(Object or Pose -> Animation)
I extracted the common code with `ANIM_OT_replace_action`
into common functions
Part of #150572
Pull Request: https://projects.blender.org/blender/blender/pulls/153812
The "Show Only Selected" button does nothing in the action editor.
That editor only shows the action of the active object anyway.
To hide any Slots that are not of selected objects, the appropriate button exists.
The button is now hidden in the action editor to communicate that to the user.
Pull Request: https://projects.blender.org/blender/blender/pulls/152706
This patch adds an operator to switch all users of one action to a different action.
It works on the action of the active object, which makes it possible to use in the 3D viewport.
We need this operator since we switched to slotted actions and many datablocks
can now point to the same action. Swapping out said action was previously possible
with the "Remap Users" operator in the Outliner, but that replaces *all* references to
said action including NLA strips and Action constraints.
This operator will *only* work on `AnimData.action`.
The operator can be found in the Action menu of the Action Editor or the Animation menu in the 3D viewport.
for Design #133725
part of the winter of quality #150572
Pull Request: https://projects.blender.org/blender/blender/pulls/153455
This removes the remaining legacy action code, that includes any unit tests for
legacy actions.
The only place that still deals with legacy actions is the versioning code.
I left the RNA functions `is_action_legacy` and `is_action_layered` in
place to not cause a breaking change for addons. However the functions
are now just hardcoded to return false and true respectively.
Part of #150644
Pull Request: https://projects.blender.org/blender/blender/pulls/152526
This patch standardizes ellipses on labels that require further input
from the user before running the operator as per our
HIG.
- PR does not include buttons (e.g. "Purge" in Outliner) and only
modifies menu items.
- PR does not include operators that wait for input from the user during
modal operation (e.g. `view3d.select_box`, `paint.sample_color`).
- Some usage of ellipses were removed since they were only present to
indicate the start of the sentence (to be finished by submenu items).
E.g. "Make Local...", "Sort Elements...", "Move..." do not require extra
input from the user.
Pull Request: https://projects.blender.org/blender/blender/pulls/150950
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
This adds an overlay to the animation editors to visualize the current scene strip
in and out points in the scene timeline when the `Sync Scene Time` option in
the sequencer is used.
* Adds an overlay toggle + panel to the dopesheet.
* Adds a new theme setting (for the overlay) under
`Common` > `Animation` > `Scene Strip Range`.
* Adds the overlay drawing to the dopesheet.
Pull Request: https://projects.blender.org/blender/blender/pulls/146165
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
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
Other code that needs to operate on "the Action that's shown in the
Dope Sheet" now accesses the newly-added
`bAnimContext::active_action`, which is now also used by
`context.active_action`. I've also added
`bAnimContext::active_action_user` in case the ID that is animated by
this Action is needed. That's either the active `Object` or the active
`Key`, again depending on the mode of the Dope Sheet editor.
The active Action can also be obtained via
`ANIM_active_action_from_area(scene, view_layer, area)`. This is a
faster method than the usual `ANIM_animdata_get_context(C, &ac)` and
it doesn't need the entire `bContext`.
The "Stash Action" and "Push Down Action" to the NLA were also
implemented by writing to `SpaceAction::action` via RNA. They now use
`ANIM_animdata_get_context()` to get the active action owner ID, and a
direct call to `blender::animrig::assign_action()` instead.
The remaining use of `SpaceAction::action` was for display &
manipulation of Scene/Action markers. This required some work to get
addressed, as there was quite a bit of spaghetti and duplicate logic
to churn through. More can be improved there, but I had to limit the
time I spent on this.
Python code that was still using `context.space_data.action` to find
the currently-showing Action has been migrated to
`context.active_action`.
Related: #119626
Pull Request: https://projects.blender.org/blender/blender/pulls/145672
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
You could basically not interact with the animation (except for
keyframes in the main region), channels region was totally empty, NLA
could not be used, ...
It is not something users will animate a lot, but we should still have
animation editors in mind when adding a new object type.
Just missing from cc31d7bb49
Pull Request: https://projects.blender.org/blender/blender/pulls/141449
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
This patch adds snapping options for the playhead to all animation editors.
The options can be modified through a new dropdown in the editor header.
All editors will show all those options, and they are shared,
so toggling the option in on editor will change it for all other editors too.
Some options are not working/relevant in some editors for example
Strips in the Dope Sheet. However for consistency the option is still shown.
This is a separate menu from the transform snapping menu because
you can toggle the snapping for transform and playhead separately.
Putting it in the existing snapping transform menu would imply that it can
be turned off with the magnet which is not the case.
Playhead snapping is explicitly disabled for the drivers editor
because there is no playhead to drag around.
Snapping to Frame/Second intervals takes the scene start as a starting point.
That means you can snap to the n-th second of the animation even though
it might not start at frame 1. The preview range is NOT taken into account
by design since the use case is working on a sub-section of the animation
in which case the snap target should not change.
Snapping is toggled by pressing CTRL as indicated by the status bar.
Snapping to Frames/Seconds is absolute, meaning no matter
how far away your cursor it will snap to the closest snap point.
All others only snap to things if they are close to the cursor in pixel values.
When mixing those two behaviors, it prefers relative snapping.
If no point is close enough to snap relative,
it will fall back to absolute snapping.
Based on the prototype #135913
Part of #135794
Pull Request: https://projects.blender.org/blender/blender/pulls/137278
The name `id_root` was not descriptive, and was just a hold-over from the
equivalent (now deprecated) property on the Action itself. `target_id_type`
is more clear, reflecting that this is the type of ID the Slot is intended
to animate.
This PR also renames the corresponding `id_root_icon` to
`target_id_type_icon`.
Note that this PR updates the GLTF import/export core addon to adhere to
these name changes as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/133164
The Action Editor was already getting crowded, but has become even
moreso with the addition of the new Slot selector. Part of this clutter
is due to the NLA-related buttons:
- The up/down track switching buttons.
- The Push Down button.
- The Stash button.
The latter two are currently still useful, but don't need to be directly
on the header itself. This PR moves them to the header's Action menu.
The up/down buttons have several issues:
- They are conceptually confusing: you cannot visually see what's
happening or which track you're on without an NLA editor open anyway,
so somewhere in the NLA Editor would be a better place for them.
- Their functionality is broken, and it seems has been for a long time:
you can go down in the track stack, but often can't go back up,
despite the existence of the up button. It doesn't appear that anyone
has reported this cripplingly broken behavior, which strongly suggests
that very few people (if anyone) is using or relying on these buttons.
- They don't make any sense when you have more than one strip on a track
anyway (which strip do you go into tweak mode on?).
For all these reasons, this PR simply removes the up/down buttons.
- Wrap the closing parenthesis onto it's own line
which makes assignments to the return value
read better.
- Reduce right-shift with multi-line function calls.
`AnimData`, NLA strips, and action constraints all have an
`action_slots` field in RNA. The purpose of this field is to list
the slots of the currently assigned action (if any) that are suitable
for the relevant ID.
However, this is not clear from the naming. In particular, given that
there is another field `action_slot` that represents the currently
assigned slot, the name `action_slots` could be easily misinterpreted
as a way to assign multiple slots at once, which is not possible.
To help clarify its actual purpose and meaning, this PR renames the
field to `action_suitable_slots`.
As a bonus, this also ends up decluttering the Python autocomplete when
looking for things related to `action_slot`.
Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130754
This commit takes the 'Slotted Actions' out of the experimental phase.
As a result:
- All newly created Actions will be slotted Actions.
- Legacy Actions loaded from disk will be versioned to slotted Actions.
- The new Python API for slots, layers, strips, and channel bags is
available.
- The legacy Python API for accessing F-Curves and Action Groups is
still available, and will operate on the F-Curves/Groups for the first
slot only.
- Creating an Action by keying (via the UI, operators, or the
`rna_struct.keyframe_insert` function) will try and share Actions
between related data-blocks. See !126655 for more info about this.
- Assigning an Action to a data-block will auto-assign a suitable Action
Slot. The logic for this is described below. However, There are cases
where this does _not_ automatically assign a slot, and thus the Action
will effectively _not_ animate the data-block. Effort has been spent
to make Action selection work both reliably for Blender users as well
as keep the behaviour the same for Python scripts. Where these two
goals did not converge, reliability and understandability for users
was prioritised.
Auto-selection of the Action Slot upon assigning the Action works as
follows. The first rule to find a slot wins.
1. The data-block remembers the slot name that was last assigned. If the
newly assigned Action has a slot with that name, it is chosen.
2. If the Action has a slot with the same name as the data-block, it is
chosen.
3. If the Action has only one slot, and it has never been assigned to
anything, it is chosen.
4. If the Action is assigned to an NLA strip or an Action constraint,
and the Action has a single slot, and that slot has a suitable ID
type, it is chosen.
This last step is what I was referring to with "Where these two goals
did not converge, reliability and understandability for users was
prioritised." For regular Action assignments (like via the Action
selectors in the Properties editor) this rule doesn't apply, even though
with legacy Actions the final state ("it is animated by this Action")
differs from the final state with slotted Actions ("it has no slot so is
not animated"). This is done to support the following workflow:
- Create an Action by animating Cube.
- In order to animate Suzanne with that same Action, assign the Action
to Suzanne.
- Start keying Suzanne. This auto-creates and auto-assigns a new slot
for Suzanne.
If rule 4. above would apply in this case, the 2nd step would
automatically select the Cube slot for Suzanne as well, which would
immediately overwrite Suzanne's properties with the Cube animation.
Technically, this commit:
- removes the `WITH_ANIM_BAKLAVA` build flag,
- removes the `use_animation_baklava` experimental flag in preferences,
- updates the code to properly deal with the fact that empty Actions are
now always considered slotted/layered Actions (instead of that relying
on the user preference).
Note that 'slotted Actions' and 'layered Actions' are the exact same
thing, just focusing on different aspects (slot & layers) of the new
data model.
The "Baklava phase 1" assumptions are still asserted. This means that:
- an Action can have zero or one layer,
- that layer can have zero or one strip,
- that strip must be of type 'keyframe' and be infinite with zero
offset.
The code to handle legacy Actions is NOT removed in this commit. It will
be removed later. For now it's likely better to keep it around as
reference to the old behaviour in order to aid in some inevitable
bugfixing.
Ref: #120406
In the Action editor header, change the "Show All Slots" filter to
become "Only Show Slot of Active Object". The default state remains
"off".
This means that any new/upgraded Action editor will show all slots in
the Action by default. I think this is a good idea, especially since
cb6ed12ef1 makes related data-blocks share
the same Action, and thus the Action will have a mixture of Object and
non-Object animation. I suspect that it'll help in understanding the new
functionality of slotted Actions when they are most visible, i.e. when
the multiple slots are all shown.
Since slotted Actions are so new, I don't think we need to add
versioning code to accomodate this change.
Pull Request: https://projects.blender.org/blender/blender/pulls/129011
Removes many of the operators, panels, and menus used exclusively by Grease Pencil v2 that are no longer needed in v3.
No functional changes are expected.
Some operators are still used by the annotations system and have to be kept around. These may be renamed in future.
Pull Request: https://projects.blender.org/blender/blender/pulls/128521
This adds an operator that splits all slots of the action on the active object,
into separate actions.
The newly created actions will be named `slot_name+Action`.
All users of those slots will be reassigned to this new action.
The exploded action will not be deleted, but will end up with 0 users
unless a fake user is set.
------
For the review, does that operator name make sense?
Pull Request: https://projects.blender.org/blender/blender/pulls/128251
This adds an operator that moves slots of slot channels selected in
the channel box to a new action.
All slots are moved together into that new action instead of
moving them into separate actions.
I think that's more reasonable because that way the "move slots into separate actions" is
still possible by selecting the slots one by one.
The "explode action" operator that does just that can be a separate operator.
The new action is named after the slot for the case when only one slot is moved.
When multiple slots are moved, the name "CombinedAction" is used.
This also adds a menu entry "Action" to the action editor.
Pull Request: https://projects.blender.org/blender/blender/pulls/128171