Skip to content

Commit dde2292

Browse files
committed
Add FBF with step
1 parent b391038 commit dde2292

File tree

4 files changed

+302
-80
lines changed

4 files changed

+302
-80
lines changed

macros/ILL.Line2FBF.moon

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
export script_name = "ILL - Line2FBF"
2+
export script_description = "It calculates line transformations frame by frame or given a step frame."
3+
export script_version = "1.0.0"
4+
export script_author = "ILLTeam"
5+
export script_namespace = "ILL.Line2FBF"
6+
7+
haveDepCtrl, DependencyControl = pcall require, "l0.DependencyControl"
8+
9+
local depctrl, ILL
10+
if haveDepCtrl
11+
depctrl = DependencyControl {
12+
feed: "https://raw.githubusercontent.com/TypesettingTools/ILL-Aegisub-Scripts/main/DependencyControl.json",
13+
{
14+
{
15+
"ILL.ILL"
16+
version: "1.7.6"
17+
url: "https://github.com/TypesettingTools/ILL-Aegisub-Scripts/"
18+
feed: "https://raw.githubusercontent.com/TypesettingTools/ILL-Aegisub-Scripts/main/DependencyControl.json"
19+
}
20+
}
21+
}
22+
ILL = depctrl\requireModules!
23+
else
24+
ILL = require "ILL.ILL"
25+
26+
{:Aegi, :Ass, :Line} = ILL
27+
28+
interface = ->
29+
{
30+
{class: "label", label: "Frame Step:", x: 0, y: 0}
31+
{class: "intedit", name: "step", min: 1, x: 0, y: 1, value: 1}
32+
}
33+
34+
main = (sub, sel, activeLine) ->
35+
button, {:step} = Aegi.display interface!, {"Ok", "Cancel"}, {close: "Cancel"}
36+
if button == "Ok"
37+
ass = Ass sub, sel, activeLine
38+
for l, s, i, n in ass\iterSel!
39+
ass\progressLine s, i, n
40+
ass\removeLine l, s
41+
Line.process ass, l
42+
Line.callBackFBFWithStep ass, l, step, (line, i, end_frame, j, n) ->
43+
ass\insertLine line, s
44+
45+
if haveDepCtrl
46+
depctrl\registerMacro main
47+
else
48+
aegisub.register_macro script_name, script_description, main

modules/ILL/ILL.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module_version = "1.7.5"
1+
module_version = "1.7.6"
22

33
haveDepCtrl, DependencyControl = pcall require, "l0.DependencyControl"
44

0 commit comments

Comments
 (0)