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.
This commit is contained in:
2021-08-31 11:46:46 +10:00
parent 65739ded54
commit aabe6e3b45
4 changed files with 52 additions and 2 deletions

View File

@@ -1047,6 +1047,8 @@ context_type_map = {
"active_pose_bone": ("PoseBone", False),
"active_sequence_strip": ("Sequence", False),
"active_editable_fcurve": ("FCurve", False),
"active_nla_strip": ("NlaStrip", False),
"active_nla_track": ("NlaTrack", False),
"annotation_data": ("GreasePencil", False),
"annotation_data_owner": ("ID", False),
"armature": ("Armature", False),