diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-07-16 12:36:57 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-11-24 15:58:32 +0300 |
commit | 057cb7e5e77bcf932882292a774156b5d8c90ab4 (patch) | |
tree | 57dfa5a30559960646b6281fff0b44e411cc6a25 /source/blender/editors/include | |
parent | 65f547c3fc116860b9c7eaf6e3d8abd2651f5168 (diff) |
Context: add accessors returning selected actions for animation editors.
Add a new 'selected_visible_actions' property to allow querying
actions that are selected in animation related editors for use in
UI and operators. The 'selected_editable_actions' variant excludes
linked actions (the only reason an action can be read-only).
In the Action and Shape Key editors there is only one action
that is specified by the field at the top of the editor.
In Dope Sheet it scans the channel rows and returns all actions
related to the selected items. This includes summary items for
actions and groups.
In Graph Editor, it lists actions associated with selected curves.
The new property is also used for Copy To Selected and Alt-Click.
Ref D11803
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index e9601220f2e..5d5d9140a24 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -577,6 +577,9 @@ const bAnimChannelType *ANIM_channel_get_typeinfo(bAnimListElem *ale); /* Print debugging info about a given channel */ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level); +/* Retrieves the Action associated with this animation channel. */ +bAction *ANIM_channel_action_get(const bAnimListElem *ale); + /* Draw the given channel */ void ANIM_channel_draw( bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc, size_t channel_index); |