From 7465bd93600a2cf135218b3ba4061777acb898d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20Fr=C3=BChsch=C3=BCtz?= Date: Sun, 2 Feb 2020 00:08:16 +0100 Subject: [PATCH] 4PointCutting: Only try to crossfade if SWS is present --- 4PointCutting/4Pcut_execute.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/4PointCutting/4Pcut_execute.lua b/4PointCutting/4Pcut_execute.lua index e596635..8db6c37 100644 --- a/4PointCutting/4Pcut_execute.lua +++ b/4PointCutting/4Pcut_execute.lua @@ -176,12 +176,14 @@ select_dst_track_only() reaper.Main_OnCommand(40058, 0) -- paste item --reaper.Main_OnCommand( reaper.NamedCommandLookup('_SWS_AWPASTE'), 0 ) -- SWS Paste -- Crossfade (only with SWS extensions, "fill gaps") -reaper.Main_OnCommand( 40290, 0 ) -- set time selection to selected items -reaper.Main_OnCommand( 40320, 0 ) -- nudge left edge of time selection left -reaper.Main_OnCommand( 40323, 0 ) -- nudge right edge of time selection right -reaper.Main_OnCommand( 40718, 0 ) -- select items on selected tracks and in time selection -reaper.Main_OnCommand( reaper.NamedCommandLookup('_SWS_AWFILLGAPSQUICKXFADE'), 0 ) -- fill gaps between selected items and crossfade --- Move dstin marker according to edit mode +if sws_present then + reaper.Main_OnCommand( 40290, 0 ) -- set time selection to selected items + reaper.Main_OnCommand( 40320, 0 ) -- nudge left edge of time selection left + reaper.Main_OnCommand( 40323, 0 ) -- nudge right edge of time selection right + reaper.Main_OnCommand( 40718, 0 ) -- select items on selected tracks and in time selection + reaper.Main_OnCommand( reaper.NamedCommandLookup('_SWS_AWFILLGAPSQUICKXFADE'), 0 ) -- fill gaps between selected items and crossfade +end + -- Move dstin marker according to edit mode if edit_mode == 1 then reaper.SetProjectMarker(mark_dstin_id, false, mark_dstin_pos + (mark_srcout_pos - mark_srcin_pos), 0, 'DST-IN_4Pcut') elseif edit_mode == 2 then