12fe0dd0cf9268e84550e57d5517caffea254a65
In the `blender::animrig` namespace, add two new functions `generic_assign_action()` and `generic_assign_action_slot()`. These are now used as basis for (un)assigning Actions and Action slots, both directly on the ID and for NLA strips. The method `Action::assign_id()` has been removed, in favour of free functions for (un)assigning Actions and slots. This is almost a non-functional change. The only thing that's different is when both an Action and a slot should get assigned in one go. Old behaviour: the slot would be inspected, and if not suitable for the animated ID, the entire operation would be aborted. In other words, any previously-assigned Action would still be assigned, making this an atomic operation. New behaviour: assigning an Action + a slot is no longer atomic. First the new Action is assigned (which uses the automatic slot selection based on the name). If after this the given slot cannot be assigned, the new Action + the auto-selected slot are still kept. This makes the Action & slot assignment more uniform in behaviour, where "assign this Action + this slot" as one operation behaves the same as two sequential operations "assign this Action" + "assign this slot". If it turns out to be confusing, we can always improve things. The return code for slot assignment is now more explicit (enum instead of boolean), so that the caller can decide what to do in case of which error (like unassigning the slot if the automatic behaviour is unwanted). Pull Request: https://projects.blender.org/blender/blender/pulls/127712
…
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.
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
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
