Skip to content

Commit

Permalink
Prevent UI refresh until completed
Browse files Browse the repository at this point in the history
  • Loading branch information
chmaha committed Feb 24, 2025
1 parent 7a52ea5 commit c3062d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ end
---------------------------------------------------------------------

function main()
-- PreventUIRefresh(1)
Undo_BeginBlock()
local _, workflow = GetProjExtState(0, "ReaClassical", "Workflow")
if workflow ~= "Vertical" then
Expand All @@ -46,6 +45,7 @@ function main()
return
end

PreventUIRefresh(1)
local first_track = duplicate_first_folder()
sync_based_on_workflow(workflow)
prepare_takes()
Expand All @@ -54,7 +54,7 @@ function main()
Main_OnCommand(40289, 0) -- unselect all items

Undo_EndBlock('Copy Destination Material to Source', 0)
-- PreventUIRefresh(-1)
PreventUIRefresh(-1)
UpdateArrange()
UpdateTimeline()
end
Expand Down Expand Up @@ -264,7 +264,7 @@ function vertical()
DeleteTrackMediaItem(first_track, new_item)
local next_folder = NamedCommandLookup("_SWS_SELNEXTFOLDER")
local start = 2
Main_OnCommand(next_folder, 0) -- select next folder
Main_OnCommand(next_folder, 0) -- select next folder

for i = start, num_of_folders, 1 do
vertical_razor()
Expand Down
4 changes: 2 additions & 2 deletions ReaClassical/ReaClassical_Duplicate folder (No items).lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function main()
if workflow == "Horizontal" then
local convert_response = MB("Are you sure you'd like to convert to a vertical workflow?"
, "Vertical Workflow", 4)
if convert_response ~=6 then return end
if convert_response ~= 6 then return end
end

local num_of_tracks = track_check()
if num_of_tracks == 0 then
MB("Please add at least one track or folder before running", "Duplicate folder (no items)", 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ end
---------------------------------------------------------------------

function main()
-- PreventUIRefresh(1)
Undo_BeginBlock()
local _, workflow = GetProjExtState(0, "ReaClassical", "Workflow")
if workflow ~= "Vertical" then
Expand All @@ -45,6 +44,7 @@ function main()
return
end

PreventUIRefresh(1)
set_first_folder_items_color()
local first_track = duplicate_first_folder()
delete_first_group_items()
Expand All @@ -54,7 +54,7 @@ function main()
Main_OnCommand(40289, 0) -- unselect all items

Undo_EndBlock('Move Destination Material to Source', 0)
-- PreventUIRefresh(-1)
PreventUIRefresh(-1)
UpdateArrange()
UpdateTimeline()
end
Expand Down

0 comments on commit c3062d6

Please sign in to comment.