- UID
- 363
- 积分
- 2032
- 帖子
- 123
- 主题
- 18
- 论坛币
- 3811
- 威望
- 10
- EP值
- 1178
- MP值
- 0
- 阅读权限
- 80
- 注册时间
- 2012-3-21
- 在线时间
- 284 小时
- 最后登录
- 2017-1-31
|
本帖最后由 jijidata 于 2013-11-22 00:45 编辑
- from tcaxPy import *
- from s import *
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # 用于保存ASS特效
- ########文字效果########
- ass_main(ASS_BUF,SubL(_BT-20+_j*3,_BT+_SK,1),an(5)+pos(_X,_Y)+fs(1)+t(0,250,fs(38)) ,_TXT)#入场效果
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_X,_Y)+t(_KT,+_KT*2,rnd(20))+t(_KT*2,_KT*4,rnd(0))+t(_KT*4,_KT*6,rnd(10))+t(_KT*6,_KT*8,rnd(20))+t(_KT*8,_KT*10,rnd(1)) ,_TXT)#表现方式
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET-(_n-_j)*1,1),an(5)+pos(_X,_Y) ,_TXT)#表现方式至退场效果之间的衔接
- ass_main(ASS_BUF,SubL(_ET-(_n-_j)*1,_ET-(_n-_j)*1+20,1),an(5)+pos(_X,_Y)+t(fsc(200, 200)+alpha(255)+bord(0)+blur(20)) ,_TXT)#退场效果
- ########附加效果########
- ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-50,50),_Y+randint(-50,50),_X+randint(-60,60),_Y+randint(-60,60),_X+randint(-60,60),_Y+randint(-60,60),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p1}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")
- for j in range(0,5):
- ass_main(ASS_BUF,SubL(_ET,_ET+randint(400,800)),an(5)+fad(0,randint(100,700))+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X,_Y,_X+randint(-70,100),_Y+randint(-80,-50),_X+randint(-80,50),_Y+randint(-40,80),_X+randint(-70,50),_Y+randint(-60,60)),"{\p1}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23")
- return (ASS_BUF, None)
复制代码 以前写的Aegisub的template改的,话说template写习惯了改用tcax有些别扭,感觉还是tcax强大~(虽然tcax不是很熟练 )
预览参见,时间的衔接与原版有些差异,用到了mod的tag,无法执行请看这里
原来的template模板:
http://www.tcax.org/forum.php?mod=viewthread&tid=806&extra=page%3D1
预览
tcc- # tcc file version
- < tcc file version = 1.000 >
- # mode configuration
- < inherit ass header = false >
- < k mode = syllable >
- < text layout = horizontal >
- < tcaxpy init = false >
- < tcaxpy user = false >
- < tcaxpy fin = false >
- # py settings
- < py file = jiji-001.py > < beg line = 1 > < end line = 0 >
- < k-timed ass file = DS2opj _k.ass >
- < font file = DFKoin-W4.ttc > < font face id = 2 > < font size = 38 >
- < fx width = 1280 > < fx height = 720 > < fx fps = 23.976 >
- < alignment = 2 >
- < x offset = 10 > < y offset = 15 >
- < spacing = 0 > < space scale = 1.000 >
- # style settings
- < font face name = "" >
- < bord = 1 > < shad = 0 >
- < primary color = FFFFFF > < secondary color = 000000 > < outline color = A31121 > < back color = 000000 >
- < primary alpha = 0 > < secondary alpha = 240 > < outline alpha = 0 > < back alpha = 240 >
- # additional settings
- < blur = 0.000 >
复制代码 |
-
2
查看全部评分
-
|