diff options
author | RedMser <RedMser> | 2022-02-04 18:37:41 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-02-04 18:39:00 +0300 |
commit | 150f42e6d3a1f48c7c9eecabc7b63936c221b352 (patch) | |
tree | cfbb7d211fe5ee1ad9333959d09471a0d7f2a1dd /release | |
parent | 7331c86dbf3bdd65fbf7e7f26bf4461515a0c591 (diff) |
NLA: shortcut to rename active strip
Use the global F2 rename panel for the NLA editor to rename NLA strips.
Reviewed By: sybren, RiggingDojo
Differential Revision: https://developer.blender.org/D12300
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index 2db2b11a5f9..78c312fd03d 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -291,6 +291,9 @@ class NLA_MT_context_menu(Menu): layout.separator() + props = layout.operator("wm.call_panel", text="Rename...") + props.name = "TOPBAR_PT_name" + props.keep_open = False layout.operator("nla.duplicate", text="Duplicate").linked = False layout.operator("nla.duplicate", text="Linked Duplicate").linked = True diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 513c1c2ae2e..ce854155b88 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -832,6 +832,14 @@ class TOPBAR_PT_name(Panel): row = row_with_icon(layout, 'NODE') row.prop(item, "label", text="") found = True + elif space_type == 'NLA_EDITOR': + layout.label(text="NLA Strip Name") + item = next( + (strip for strip in context.selected_nla_strips if strip.active), None) + if item: + row = row_with_icon(layout, 'NLA') + row.prop(item, "name", text="") + found = True else: if mode == 'POSE' or (mode == 'WEIGHT_PAINT' and context.pose_object): layout.label(text="Bone Name") |