- UID
- 2546
- 积分
- 159
- 帖子
- 30
- 主题
- 5
- 论坛币
- 868
- 威望
- 0
- EP值
- 134
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2015-5-9
- 在线时间
- 52 小时
- 最后登录
- 2024-10-20
|
本帖最后由 Seekladoom 于 2022-4-19 03:43 编辑
- from pyonfx import *
- from random import *
- io = Ass("番剧名_K.ass", "番剧名_FX.ass")
- meta, styles, lines = io.get_data()
- # 模板分区
- def Princess_OPJP(line, l):
- if line.style == "OPJP":
- #以下是在Aegisub下的retime函数中的【开始时间】和【结束时间】均为0时,PyonFX中可以直接使用的【列表属性写法】。
- # syl
- l.start_time = line.start_time + syl.start_time
- l.end_time = line.start_time + syl.end_time
-
- # presyl
- l.start_time = line.start_time + syl.start_time
- l.end_time = line.start_time + syl.start_time
-
- # postsyl
- l.start_time = line.start_time + syl.end_time
- l.end_time = line.start_time + syl.end_time
-
- # line
- l.start_time = line.start_time
- l.end_time = line.end_time
-
- # preline
- l.start_time = line.start_time
- l.end_time = line.start_time
-
- # postline
- l.start_time = line.end_time
- l.end_time = line.end_time
-
- # start2syl
- l.start_time = line.start_time
- l.end_time = line.start_time + syl.start_time
-
- # syl2end
- l.start_time = line.start_time + syl.end_time
- l.end_time = line.end_time
- # set or abs
- l.start_time = 0
- l.end_time = 0
- # sylpct
- l.start_time = line.start_time + syl.start_time
- l.end_time = line.start_time + syl.start_time
-
-
- #以下是在Aegisub下的retime函数中的【开始时间】和【结束时间】均为0时,PyonFX中可以考虑的【简化写法】。
- # syl
- l.start_time = _lstart + _sstart
- l.end_time = _lstart + _send
-
- # presyl
- l.start_time = _lstart + _sstart
- l.end_time = _lstart + _sstart
-
- # postsyl
- l.start_time = _lstart + _send
- l.end_time = _lstart + _send
-
- # line
- l.start_time = _lstart
- l.end_time = _lend
-
- # preline
- l.start_time = _lstart
- l.end_time = _lstart
-
- # postline
- l.start_time = _lend
- l.end_time = _lend
-
- # start2syl
- l.start_time = _lstart
- l.end_time = _lstart + _sstart
-
- # syl2end
- l.start_time = _lstart + _send
- l.end_time = _lend
- # set or abs(完全自定义)
- l.start_time = 0
- l.end_time = 0
- # sylpct
- l.start_time = _lstart + _sstart
- l.end_time = _lstart + _sstart
复制代码
|
|