d1962be44c313464ad3c4e5143418fbab076d3e0
SpaceAction::action pointer
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
…
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%
