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
0 commit comments