- UID
- 319
- 积分
- 3718
- 帖子
- 260
- 主题
- 10
- 论坛币
- 1147
- 威望
- 29
- EP值
- 628
- MP值
- 5
- 阅读权限
- 80
- 注册时间
- 2012-2-26
- 在线时间
- 222 小时
- 最后登录
- 2019-1-1
|
- from tcaxPy import *
- def tcaxPy_Init():
- global _FD # frame duration, in millisecond
- _FD = 1000 / GetVal(val_FXFPS)
- time_gap = 1 # you can change this value to 0, or 2 or any other number
- time_fac = 1 # you can change this value to 0, or 2 or any other number
- _BL = blur(4)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = []
- CL=[ "26B1FD", "CECECE","C8E787","6883FF","FCD8AF","A9E096","AF7BFF","FA6CA7","FC8769","F596EE" ]
-
-
- if _i == 4 or _i == 6 or _i == 8 or _i == 10 :
- #################进入方式#################
- duration = 10 * _FD
- in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
- in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
- in_EFT =an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X+1050, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
- ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
- # ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
- #################退场方式#################
-
-
- out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
- out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
- out_EFT = pos(_X+1050, _Y) + fad(0, duration) +an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
- ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
-
-
- #################附加效果#################
-
- main_ts= _BT+_SK+_KT*2/3
- main_te = out_ts
- count = int(main_te - main_ts)
- step = int(_FD / 5)
- for i in range(0, count, step):
- main_EFT =an(3)+ pos(_X+1050, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
- ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
- if main_ts + i - step < main_te: # maybe we need to add the last frame
- ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
-
-
- #################表现效果#################
- ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(3)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X+1050,_Y),_TXT)
- # ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X+1050,_Y),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(3) +pos(_X+1050,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(3) +pos(_X+1050,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X+1050,_Y),_TXT)
-
- elif _i == 12 :
- #################进入方式#################
- duration = 10 * _FD
- in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
- in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
- in_EFT =an(1)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X+860, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
- ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
- # ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
- #################退场方式#################
-
-
- out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
- out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
- out_EFT = pos(_X+860, _Y) + fad(0, duration) +an(1)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
- ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
-
-
- #################附加效果#################
-
- main_ts= _BT+_SK+_KT*2/3
- main_te = out_ts
- count = int(main_te - main_ts)
- step = int(_FD / 5)
- for i in range(0, count, step):
- main_EFT =an(1)+ pos(_X+860, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
- ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
- if main_ts + i - step < main_te: # maybe we need to add the last frame
- ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
-
-
- #################表现效果#################
- ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(1)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X+860,_Y),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(1) +pos(_X+860,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(1) +pos(_X+860,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(1)+alpha3(255)+alpha4(255)+pos(_X+860,_Y),_TXT)
-
-
-
-
- else :
- #################进入方式#################
- duration = 15 * _FD
- in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
- in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
- in_EFT =an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
- ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
- # ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
- #################退场方式#################
-
-
- out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
- out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
- out_EFT = pos(_X, _Y) + fad(0, duration) +an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
- ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
-
-
- #################附加效果#################
-
- main_ts= _BT+_SK+_KT*2/3
- main_te = out_ts
- count = int(main_te - main_ts)
- step = int(_FD / 5)
- for i in range(0, count, step):
- main_EFT =an(3)+ pos(_X, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
- ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
- if main_ts + i - step < main_te: # maybe we need to add the last frame
- ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
-
-
- #################表现效果#################
- ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(3)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
- # ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X,_Y),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(3) +pos(_X,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(3) +pos(_X,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X,_Y),_TXT)
- return (ASS_BUF,None)
复制代码 http://pan.baidu.com/s/1ntr3DBN |
-
1
查看全部评分
-
|