Anim: Support slotted Actions in 'Push Down' NLA operator #128444

Merged
Sybren A. Stüvel merged 2 commits from dr.sybren/blender:anim/nla-push-down-slotted-action into main 2024-10-04 16:21:00 +02:00

2 Commits

Author SHA1 Message Date
5c477bf50f Anim: Support slotted Actions in 'Push Down' NLA operator
All checks were successful
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
Instead of calling `BKE_nlastrip_new()` (which, due to backward compat
reasons automatically picks a slot), the Push Down operator now calls
`BKE_nlastrip_new_for_slot()`, which explicitly assigns the given slot.

On top of that, the frame range of the slot is used to set the strip's
frame range (instead of the range of the entire Action).
2024-10-04 13:36:17 +02:00
c6bd2f4aaf Anim: Fix entering NLA tweak mode with slotted Actions
Instead of using direct property manipulation to enter tweak mode, use
the regular `animrig::assign_…` functions. When used in the right order,
as introduced in this commit, the "disallow assigning an Action in tweak
mode" logic can just stay simple as it is.
2024-10-04 13:36:17 +02:00