diff options
author | garret <garret@airmail.cc> | 2021-07-14 16:39:13 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-07-14 16:39:13 +0100 |
commit | 5f1fc4cbb321401d308f8510ef184f690a173aa9 (patch) | |
tree | c6c92940912eb41b9aa998173e66f06d9d85cdb0 | |
parent | 613849e8aec4a48043fe2a62992eb2ce914b85ed (diff) | |
download | aegisub-scripts-5f1fc4cbb321401d308f8510ef184f690a173aa9.tar.gz aegisub-scripts-5f1fc4cbb321401d308f8510ef184f690a173aa9.tar.bz2 aegisub-scripts-5f1fc4cbb321401d308f8510ef184f690a173aa9.zip |
add reporting of amount of bleeds
-rw-r--r-- | scenebleed.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scenebleed.lua b/scenebleed.lua index 5f4fab3..c0d3908 100644 --- a/scenebleed.lua +++ b/scenebleed.lua @@ -1,7 +1,7 @@ script_name="Scenebleed Detector"
script_description="marks possible scenebleeds with an effect"
script_author="garret"
-script_version="2021-07-06"
+script_version="2021-07-14"
function main(sub, sel)
local thresh = aegisub.frame_from_ms(500)
@@ -9,6 +9,7 @@ function main(sub, sel) -- tried to make config file work, failed, so shit's hardcoded
local keyframes = aegisub.keyframes()
+ local bleed_count = 0
for j,i in ipairs(sel) do
line = sub[i]
local start_frame = aegisub.frame_from_ms(line.start_time)
@@ -21,10 +22,12 @@ function main(sub, sel) else
line.effect = line.effect.."; "..bleedstring
end
+ bleed_count = bleed_count + 1
sub[i] = line
end
end
end
+ aegisub.log(bleed_count.." scenebleeds found.")
aegisub.set_undo_point(script_name)
return sel
end
|