Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRedMser <RedMser>2022-04-14 11:56:08 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-04-14 11:58:14 +0300
commitd6e72412373e2f90969b2f2a6ecfcb420011784b (patch)
tree192a0e71c9760e6d9fe1ed66aa16afda34adce13 /release/scripts/startup/bl_ui/space_time.py
parent4fa3eadce99a87de90b8119e49cfd8ccba56c305 (diff)
Animation: Add F2 for renaming markers
F2 allows renaming lots of different types of active items, and now it also works for markers. Before, Ctrl+M was used, and it's context-sensitive: you often get "Mirror Keys" instead, when your cursor isn't on the markers region, and that operator has nothing to do with either renaming or markers. **What this commit does:** - Replace Ctrl+M shortcut with F2. - Adds the `TOPBAR_PT_name_marker` panel which is implemented similar to the global rename panel. This having to press enter twice to confirm or escape twice to cancel, which would happen if the `marker.rename` operator was called directly. - Replace usages of `marker.rename` in the UI with `wm.call_panel`. - To make the Industry Compatible keymap consistent with Blender Default, the rename shortcut only works when hovering the markers area. Reviewed By: ChrisLend, sybren Differential Revision: https://developer.blender.org/D12298
Diffstat (limited to 'release/scripts/startup/bl_ui/space_time.py')
-rw-r--r--release/scripts/startup/bl_ui/space_time.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 5296900fa30..b5b124253f3 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -187,7 +187,9 @@ def marker_menu_generic(layout, context):
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
+ props = layout.operator("wm.call_panel", text="Rename Marker")
+ props.name = "TOPBAR_PT_name_marker"
+ props.keep_open = False
layout.operator("marker.move", text="Move Marker")
layout.separator()