Skip to content

Commit

Permalink
Use ripple mode appropriate to workflow thereby maintaining relative …
Browse files Browse the repository at this point in the history
…source marker positions
  • Loading branch information
chmaha committed Feb 9, 2025
1 parent 0730521 commit f4dd435
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
10 changes: 9 additions & 1 deletion ReaClassical/ReaClassical_3-point Insert Edit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ end
function main()
PreventUIRefresh(1)
Undo_BeginBlock()
local _, workflow = GetProjExtState(0, "ReaClassical", "Workflow")
Main_OnCommand(41121, 0) -- Options: Disable trim content behind media items when editing
local group_state = GetToggleCommandState(1156)
if group_state ~= 1 then
Expand Down Expand Up @@ -111,6 +112,13 @@ function main()
Main_OnCommand(40020, 0) -- Remove time selection
move_to_project_tab(dest_proj)
split_at_dest_in()

if workflow == "Horizontal" then
Main_OnCommand(40311, 0) -- Set ripple-all-tracks
else
Main_OnCommand(40310, 0) -- Set ripple-per-track
end

local paste = NamedCommandLookup("_SWS_AWPASTE")
Main_OnCommand(paste, 0) -- SWS_AWPASTE
mark_as_edit()
Expand Down Expand Up @@ -252,7 +260,7 @@ function copy_source()
local is_selected = true
local focus = NamedCommandLookup("_BR_FOCUS_ARRANGE_WND")
Main_OnCommand(focus, 0) -- BR_FOCUS_ARRANGE_WND
Main_OnCommand(40311, 0) -- Set ripple-all-tracks
--Main_OnCommand(40311, 0) -- Set ripple-all-tracks
Main_OnCommand(40289, 0) -- Item: Unselect all items
GoToMarker(0, 998, false)
select_matching_folder()
Expand Down
2 changes: 1 addition & 1 deletion ReaClassical/ReaClassical_Delete Leaving Silence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function main()
DeleteProjectMarker(NULL, 998, false)
DeleteProjectMarker(NULL, 999, false)
Main_OnCommand(40289, 0) -- Item: Unselect all items
Main_OnCommand(41990, 0) -- Toggle ripple per-track (off)
Main_OnCommand(41990, 0) -- Toggle ripple per-track (on)
else
MB("Please use SOURCE-IN and SOURCE-OUT markers", "Delete Leaving Silence", 0)
end
Expand Down
8 changes: 5 additions & 3 deletions ReaClassical/ReaClassical_Delete With Ripple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ end
function main()
PreventUIRefresh(1)
Undo_BeginBlock()
local _, workflow = GetProjExtState(0, "ReaClassical", "Workflow")
Main_OnCommand(40927, 0) -- Options: Enable auto-crossfade on split
Main_OnCommand(41121,0) -- Options: Disable trim content behind media items when editing
local group_state = GetToggleCommandState(1156)
Expand All @@ -55,10 +56,11 @@ function main()
Main_OnCommand(40718, 0) -- Select all items on selected tracks in current time selection
Main_OnCommand(40034, 0) -- Item Grouping: Select all items in group(s)
local folder = GetSelectedTrack(0, 0)
if GetMediaTrackInfo_Value(folder, "IP_TRACKNUMBER") == 1 then
Main_OnCommand(40311, 0) -- Set ripple-all-tracks
else

if workflow == "Vertical" and GetMediaTrackInfo_Value(folder, "IP_TRACKNUMBER") == 1 then
Main_OnCommand(40310, 0) -- Set ripple-per-track
else
Main_OnCommand(40311, 0) -- Set ripple-all-tracks
end
local delete = NamedCommandLookup("_XENAKIOS_TSADEL")
Main_OnCommand(delete, 0) -- XENAKIOS_TSADEL
Expand Down
9 changes: 8 additions & 1 deletion ReaClassical/ReaClassical_S-D Edit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ end
function main()
PreventUIRefresh(1)
Undo_BeginBlock()
local _, workflow = GetProjExtState(0, "ReaClassical", "Workflow")
Main_OnCommand(41121,0) -- Options: Disable trim content behind media items when editing
local group_state = GetToggleCommandState(1156)
if group_state ~= 1 then
Expand Down Expand Up @@ -153,7 +154,13 @@ function main()
Main_OnCommand(40718, 0) -- Select all items on selected tracks in current time selection
Main_OnCommand(40034, 0) -- Item Grouping: Select all items in group(s)
Main_OnCommand(40630, 0) -- Go to start of time selection
Main_OnCommand(40311, 0) -- Ripple-all mode

if workflow == "Horizontal" then
Main_OnCommand(40311, 0) -- Set ripple-all-tracks
else
Main_OnCommand(40310, 0) -- Set ripple-per-track
end

local delete = NamedCommandLookup("_XENAKIOS_TSADEL")
Main_OnCommand(delete, 0) -- Adaptive Delete
local paste = NamedCommandLookup("_SWS_AWPASTE")
Expand Down

0 comments on commit f4dd435

Please sign in to comment.