diff options
author | William Reynish <billrey@me.com> | 2020-02-16 23:39:12 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2020-02-16 23:39:12 +0300 |
commit | 819af2094b21a78d57c7480a649f97502c09ec1f (patch) | |
tree | c1b3ebb3da3a5e3a812dace962ee6cc630ad4a58 /release | |
parent | 31530d0da95cea17c4e30fd449b2ce6f01feda3b (diff) |
Rename Sequencer 'Cut' to 'Split'
This avoids the ambiguity with the Cut operator in the Sequencer, which could be confused with Cut/Copy/Paste.
Use 'Split' for the operator and 'Blade' for the active tool.
Patch by Nathan Lovato, with edits
Differential Revision: https://developer.blender.org/D5542
Diffstat (limited to 'release')
4 files changed, 25 insertions, 23 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index e31e6a77f90..f222513ddc9 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2397,9 +2397,9 @@ def km_sequencer(params): items.extend([ *_template_items_select_actions(params, "sequencer.select_all"), - ("sequencer.cut", {"type": 'K', "value": 'PRESS'}, + ("sequencer.split", {"type": 'K', "value": 'PRESS'}, {"properties": [("type", 'SOFT')]}), - ("sequencer.cut", {"type": 'K', "value": 'PRESS', "shift": True}, + ("sequencer.split", {"type": 'K', "value": 'PRESS', "shift": True}, {"properties": [("type", 'HARD')]}), ("sequencer.mute", {"type": 'H', "value": 'PRESS'}, {"properties": [("unselected", False)]}), @@ -2450,7 +2450,7 @@ def km_sequencer(params): ("sequencer.snap", {"type": 'S', "value": 'PRESS', "shift": True}, None), ("sequencer.swap_inputs", {"type": 'S', "value": 'PRESS', "alt": True}, None), *( - (("sequencer.cut_multicam", + (("sequencer.split_multicam", {"type": NUMBERS_1[i], "value": 'PRESS'}, {"properties": [("camera", i + 1)]}) for i in range(10) @@ -6120,12 +6120,12 @@ def km_sequencer_editor_tool_select_box(params): ) -def km_sequencer_editor_tool_cut(_params): +def km_sequencer_editor_tool_blade(_params): return ( - "Sequencer Tool: Cut", + "Sequencer Tool: Blade", {"space_type": 'SEQUENCE_EDITOR', "region_type": 'WINDOW'}, - {"items":[ - ("sequencer.cut", {"type": 'LEFTMOUSE', "value": 'PRESS'}, + {"items": [ + ("sequencer.split", {"type": 'LEFTMOUSE', "value": 'PRESS'}, {"properties": [("type", 'SOFT'), ("side", 'NO_CHANGE'), ("use_cursor_position", True), ("ignore_selection", True)]}), ]}, ) @@ -6346,7 +6346,7 @@ def generate_keymaps(params=None): km_3d_view_tool_sculpt_gpencil_select_lasso(params), km_sequencer_editor_tool_select(params), km_sequencer_editor_tool_select_box(params), - km_sequencer_editor_tool_cut(params), + km_sequencer_editor_tool_blade(params), ] # ------------------------------------------------------------------------------ diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index 9a0028d1f14..206f778195e 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -79,11 +79,11 @@ class SequencerCrossfadeSounds(Operator): return {'CANCELLED'} -class SequencerCutMulticam(Operator): - """Cut multi-cam strip and select camera""" +class SequencerSplitMulticam(Operator): + """Split multi-cam strip and select camera""" - bl_idname = "sequencer.cut_multicam" - bl_label = "Cut multicam" + bl_idname = "sequencer.split_multicam" + bl_label = "Split multicam" bl_options = {'REGISTER', 'UNDO'} camera: IntProperty( @@ -112,7 +112,7 @@ class SequencerCutMulticam(Operator): s.select = True cfra = context.scene.frame_current - bpy.ops.sequencer.cut(frame=cfra, type='SOFT', side='RIGHT') + bpy.ops.sequencer.split(frame=cfra, type='SOFT', side='RIGHT') for s in context.scene.sequence_editor.sequences_all: if s.select and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end: context.scene.sequence_editor.active_strip = s @@ -369,7 +369,7 @@ def calculate_duration_frames(context, duration_seconds): classes = ( SequencerCrossfadeSounds, - SequencerCutMulticam, + SequencerSplitMulticam, SequencerDeinterlaceSelectedMovies, SequencerFadesClear, SequencerFadesAdd, diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index f05a0e18eed..903416b78e6 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -716,8 +716,8 @@ class SEQUENCER_MT_strip(Menu): layout.menu("SEQUENCER_MT_strip_transform") layout.separator() - layout.operator("sequencer.cut", text="Cut").type = 'SOFT' - layout.operator("sequencer.cut", text="Hold Cut").type = 'HARD' + layout.operator("sequencer.split", text="Split").type = 'SOFT' + layout.operator("sequencer.split", text="Hold Split").type = 'HARD' layout.separator() layout.operator("sequencer.copy", text="Copy") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 79fd5f85851..02db00e36c0 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1706,22 +1706,23 @@ class _defs_node_edit: keymap="Node Tool: Links Cut", ) + class _defs_sequencer_generic: @ToolDef.from_fn - def cut(): + def blade(): def draw_settings(_context, layout, tool): - props = tool.operator_properties("sequencer.cut") + props = tool.operator_properties("sequencer.split") row = layout.row() row.use_property_split = False row.prop(props, "type", expand=True) return dict( - idname="builtin.cut", - label="Cut", + idname="builtin.blade", + label="Blade", icon="ops.sequencer.blade", cursor='CROSSHAIR', widget=None, - keymap="Sequencer Tool: Cut", + keymap="Sequencer Tool: Blade", draw_settings=draw_settings, ) @@ -2255,15 +2256,16 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): ], 'SEQUENCER': [ *_tools_select, - _defs_sequencer_generic.cut, + _defs_sequencer_generic.blade, ], 'SEQUENCER_PREVIEW': [ *_tools_select, *_tools_annotate, - _defs_sequencer_generic.cut, + _defs_sequencer_generic.blade, ], } + classes = ( IMAGE_PT_tools_active, NODE_PT_tools_active, |