diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-31 04:46:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-31 05:06:47 +0300 |
commit | aabe6e3b457f1d4f1b860ed510bf2630a818465e (patch) | |
tree | b32fca731f1e3e036de1f0d887b4b86644320512 /source/blender/editors/include | |
parent | 65739ded542728a6dcca892fe42e20ab7da7ad28 (diff) |
Context: add "active_nla_track" & "active_nla_strip" context members
Selection was already accessible but not active.
Add utility functions:
- ANIM_nla_context_track to access the active track,
following the convention of ANIM_nla_context_strip.
- ANIM_nla_context_*_ptr versions of these functions,
needed to for creating context members to access the ID pointer.
Part of fix for T90723.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 75c02082bd3..8b954b0fe69 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -678,6 +678,11 @@ void ANIM_draw_framerange(struct Scene *scene, struct View2D *v2d); /* ------------- UI Panel Drawing -------------- */ + +bool ANIM_nla_context_track_ptr(const struct bContext *C, struct PointerRNA *r_ptr); +bool ANIM_nla_context_strip_ptr(const struct bContext *C, struct PointerRNA *r_ptr); + +struct NlaTrack *ANIM_nla_context_track(const struct bContext *C); struct NlaStrip *ANIM_nla_context_strip(const struct bContext *C); struct FCurve *ANIM_graph_context_fcurve(const struct bContext *C); |