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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lovato <nathan@gdquest.com>2020-02-09 04:59:08 +0300
committerNathan Lovato <nathan@gdquest.com>2020-02-13 18:19:35 +0300
commitcf9fde2568aa81197d0f36019ee429880430906d (patch)
treeb74875c507001fa41ca979bc689cfd4a0dee0f13 /power_sequencer/tools/trim.py
parent47d56e88240dc330e9173c668f1ee9fee39fb36c (diff)
power_sequencer: update to the latest master
This commit brings Power Sequencer to the current rolling version, that is commit 9562eb58d164e234f61225250d6ac5ca858ada7b on https://github.com/GDQuest/blender-power-sequencer/. I had already made an intermediate commit that added new features and fixed some bugs. This commit brings bug fixes and many quality of life improvements. - Human-readable changelog: https://github.com/GDQuest/blender-power-sequencer/blob/master/CHANGELOG.md - 1.4.0 release post: https://github.com/GDQuest/blender-power-sequencer/releases/tag/1.4.0 - All the commits since v1.3.0 (previous update + this one in this repository): https://github.com/GDQuest/blender-power-sequencer/compare/1.3.0...master
Diffstat (limited to 'power_sequencer/tools/trim.py')
-rw-r--r--power_sequencer/tools/trim.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/power_sequencer/tools/trim.py b/power_sequencer/tools/trim.py
new file mode 100644
index 00000000..e6a54437
--- /dev/null
+++ b/power_sequencer/tools/trim.py
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
+#
+# This file is part of Power Sequencer.
+#
+# Power Sequencer is free software: you can redistribute it and/or modify it under the terms of the
+# GNU General Public License as published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# Power Sequencer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with Power Sequencer. If
+# not, see <https://www.gnu.org/licenses/>.
+#
+import bpy
+from bpy.types import WorkSpaceTool
+
+
+class POWER_SEQUENCER_TOOL_Trim(WorkSpaceTool):
+ bl_space_type = "SEQUENCE_EDITOR"
+ bl_context_mode = "SEQUENCER"
+
+ bl_idname = "power_sequencer.trim"
+ bl_label = "Trim"
+ bl_description = "Cut and trim strips with the mouse"
+ bl_icon = "ops.mesh.knife_tool"
+ bl_widget = None
+ bl_keymap = (
+ (
+ "power_sequencer.mouse_trim",
+ {"type": "LEFTMOUSE", "value": "PRESS"},
+ {"select_mode": "CONTEXT", "gap_remove": False},
+ ),
+ (
+ "power_sequencer.mouse_trim",
+ {"type": "LEFTMOUSE", "value": "PRESS", "shift": True},
+ {"select_mode": "CURSOR", "gap_remove": True},
+ ),
+ )
+
+ def draw_settings(context, layout, tool):
+ props = tool.operator_properties("power_sequencer.mouse_trim")
+ layout.prop(props, "mode")