Sybren A. Stüvel bf9eb57554 Anim: Fix bug in Action Slot auto-assignment code
The generic Action assignment function tries to find a slot to
auto-assign. This would always look at the last-used slot identifier on
the ID's `AnimData` struct, even when assigning to an NLA strip or
Action constraint.

This commit removes the `Action::find_suitable_slot(ID)` method, and
replaces it with a `generic_slot_for_autoassign(ID, action,
last_slot_identifier)` function. That function basically copies the
behaviour of `find_suitable_slot()`, except that it gets the
`last_slot_identifier` from the caller.

Another difference is that it no longer checks whether the Action is
already assigned, and so also never uses the currently-assigned slot
handle. In the only code flow that calls `generic_slot_for_autoassign()`
this situation would never occur, and thus it's better to delete this
dead code.

Pull Request: https://projects.blender.org/blender/blender/pulls/131491
2024-12-09 14:48:14 +01:00
2024-12-03 16:26:01 +01:00
2023-12-08 13:28:13 +11:00
2024-12-03 16:26:01 +01:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%