1
1

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
This commit is contained in:
RedMser
2022-02-04 16:37:41 +01:00
committed by Sybren A. Stüvel
parent 7331c86dbf
commit 150f42e6d3
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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")