- UID
- 215
- 积分
- 15394
- 帖子
- 1163
- 主题
- 27
- 论坛币
- 428
- 威望
- 125
- EP值
- 1992
- MP值
- 26
- 阅读权限
- 100
- 注册时间
- 2011-10-13
- 在线时间
- 668 小时
- 最后登录
- 2018-6-25
|
本帖最后由 渣渣疯子 于 2013-1-26 04:21 编辑
- from tcaxPy import *
- def tcaxPy_Init():
- global _FontFileName # frame duration, in millisecond
- global _FD
- global _Fs
- global _Length
- global _Bd
- global _Br
- global _FaceID
- global _Font
- global _Spacing
- global _ResolutionX
- global _ResolutionY
- _FontFileName = GetVal(val_FontFileName)
- _FD = 1000 / GetVal(val_FXFPS)
- _Fs = GetVal(val_FontSize)
- _Length = GetVal(val_TextLength)
- _Bd = GetVal(val_Bord)
- _Br = GetVal(val_Blur)
- _FaceID = GetVal(val_FaceID)
- _Spacing = GetVal(val_Spacing)
- _ResolutionX = GetVal(val_ResolutionX)
- _ResolutionY = GetVal(val_ResolutionY)
- _Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def fr(x):
- X = randint(-x,x)
- return frx(X)+fry(X)+frz(X)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # used for saving ASS FX lines
- step = int(_FD/10)
- sakura = ["m 9 23 b 8 22 7 21 5 19 b 4 18 2 16 1 11 b 1 8 2 5 4 3 b 5 2 6 1 7 1 b 8 3 8 4 9 5 b 10 4 10 3 11 1 b 13 2 14 3 14 3 b 16 5 17 8 17 11 b 16 16 14 18 13 19 b 11 21 10 22 9 23 "]
-
-
- if _i == 0:
- if _j < 6:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,2),an(5)+pos(_X,_Y)+color1("E9A99C")+blur(1)+bord(1)+color3("E9A99C")+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,1),an(5)+pos(_X+4,_Y+4)+color1("9E947C")+blur(1)+bord(1)+color3("9E947C")+alpha1(130)+alpha3(130)+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+30,2),an(5)+pos(_X,_Y)+color1("E9A99C")+blur(1)+bord(1)+color3("E9A99C")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+30,1),an(5)+pos(_X+4,_Y+4)+color1("9E947C")+blur(1)+bord(1)+color3("9E947C")+alpha1(130)+alpha3(130)+fad(0,300),_TXT)
- for i in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+i), int(_X+_A/2), int(_Y-_Fs/2+i+1))
- for j in range(_BT+_SK,_ET,step):
- t = j
- t1 = t + step
- RAN1 = randint(-2,2)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("E9A99C")+blur(1)+bord(1)+color3("E9A99C")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("9E947C")+blur(1)+bord(1)+color3("9E947C")+alpha1(130)+alpha3(130)+Clip,_TXT)
- else:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,2),an(5)+pos(_X,_Y)+color1("49271F")+blur(1)+bord(1)+color3("49271F")+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,1),an(5)+pos(_X+4,_Y+4)+color1("9E947C")+blur(1)+bord(1)+color3("9E947C")+alpha1(130)+alpha3(130)+fad(300,0),_TXT)
- for i in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+i), int(_X+_A/2), int(_Y-_Fs/2+i+1))
- for j in range(_BT+_SK,_ET,step):
- t = j
- t1 = t + step
- RAN1 = randint(-2,2)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("49271F")+blur(1)+bord(1)+color3("49271F")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("9E947C")+blur(1)+bord(1)+color3("9E947C")+alpha1(130)+alpha3(130)+Clip,_TXT)
- for k in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+k), int(_X+_A/2), int(_Y-_Fs/2+k+1))
- for h in range(_ET,_ET+30,step):
- t = h
- t1 = t + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("FFFAF0")+blur(1)+bord(1)+color3("FFFAF0")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("95614C")+blur(1)+bord(1)+color3("95614C")+alpha1(130)+alpha3(130)+Clip,_TXT)
- if _i > 0 and _i < 3:
- for h in range(_BT+_SK,_ET,step):
- t = h
- t1 = t + step
- step2 = int((_ET - _BT - _SK) / step)
- H = int((h - _BT - _SK) / step)
- if H % 2 == 0:
- MOVE = move(_X + (step2 * 2) - (H * 2),_Y,_X + (step2 * 2) - ((H + 1) * 2),_Y - 2)
- MOVE2 = move((_X + (step2 * 2) - (H * 2)) + 4,_Y,_X + (step2 * 2) - ((H + 1) * 2),_Y - 2)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+MOVE+color1("C35C22")+blur(1)+bord(1)+color3("C35C22"),_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+MOVE2+color1("1A013C")+blur(1)+bord(1)+color3("1A013C")+alpha1(130)+alpha3(130),_TXT)
- else:
- MOVE = move(_X + (step2 * 2) - (H * 2),_Y - 2,_X + (step2 * 2) - ((H + 1) * 2),_Y)
- MOVE2 = move((_X + (step2 * 2) - (H * 2)) + 4,_Y - 2,_X + (step2 * 2) - ((H + 1) * 2),_Y)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+MOVE+color1("C35C22")+blur(1)+bord(1)+color3("C35C22"),_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+MOVE2+color1("1A013C")+blur(1)+bord(1)+color3("1A013C")+alpha1(130)+alpha3(130),_TXT)
- for k in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+k), int(_X+_A/2), int(_Y-_Fs/2+k+1))
- for h in range(_ET,_ET+30,step):
- t = h
- t1 = t + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("FFFAF0")+blur(1)+bord(1)+color3("FFFAF0")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("95614C")+blur(1)+bord(1)+color3("95614C")+alpha1(130)+alpha3(130)+Clip,_TXT)
- if _i == 3:
- for h in range(_BT+_SK,_ET,step):
- t = h
- t1 = t + step
- step2 = int((_ET - _BT - _SK) / step)
- H = int((h - _BT - _SK) / step)
- if H % 2 == 0:
- MOVE = move(_X + (step2 * 2) - (H * 2),_Y,_X + (step2 * 2) - ((H + 1) * 2),_Y - 2)
- MOVE2 = move((_X + (step2 * 2) - (H * 2)) + 4,_Y,_X + (step2 * 2) - ((H + 1) * 2),_Y - 2)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+MOVE+color1("34DADA")+blur(1)+bord(1)+color3("34DADA"),_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+MOVE2+color1("5D9BA1")+blur(1)+bord(1)+color3("5D9BA1")+alpha1(130)+alpha3(130),_TXT)
- else:
- MOVE = move(_X + (step2 * 2) - (H * 2),_Y - 2,_X + (step2 * 2) - ((H + 1) * 2),_Y)
- MOVE2 = move((_X + (step2 * 2) - (H * 2)) + 4,_Y - 2,_X + (step2 * 2) - ((H + 1) * 2),_Y)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+MOVE+color1("34DADA")+blur(1)+bord(1)+color3("34DADA"),_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+MOVE2+color1("5D9BA1")+blur(1)+bord(1)+color3("5D9BA1")+alpha1(130)+alpha3(130),_TXT)
- for k in range(int(_A)):
- Clip = clip(int(_X-_A / 2+k), int(_Y-_Fs/2), int(_X-_A/2+k+1), int(_Y+_Fs/2))
- for h in range(_ET,_ET+30,step):
- t = h
- t1 = t + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("34DADA")+blur(1)+bord(1)+color3("34DADA")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("5D9BA1")+blur(1)+bord(1)+color3("5D9BA1")+alpha1(130)+alpha3(130)+Clip,_TXT)
- if _i > 3 and _i < 6:
- ass_main(ASS_BUF,SubL(_BT-30,_BT,3),an(5)+move(_X+100,_Y,_X,_Y)+color1("3B08BC")+blur(1)+bord(1)+color3("3B08BC"),_TXT)
- ass_main(ASS_BUF,SubL(_BT-30,_BT,2),an(5)+move(_X+100+1,_Y+1,_X+1,_Y+1)+color1("8660BC")+blur(1)+bord(1)+color3("8660BC")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_ET,3),an(5)+pos(_X,_Y)+color1("3B08BC")+blur(1)+bord(1)+color3("3B08BC"),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_ET,2),an(5)+pos(_X+1,_Y+1)+color1("8660BC")+blur(1)+bord(1)+color3("8660BC")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,1),an(5)+pos(_X,_Y)+color1("441759")+blur(2)+bord(3)+color3("441759")+alpha1(200)+fscx(50)+fscy(50)+frz(45)+animation(fscx(150)+fscy(150)+frz(405)),"{\p1}m 0 0 l 30 0 l 30 30 l 0 30 l 0 0 {\p0}")
- for k in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+k), int(_X+_A/2), int(_Y-_Fs/2+k+1))
- for h in range(_ET,_ET+30,step):
- t = h
- t1 = t + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y)+color1("3B08BC")+blur(1)+bord(1)+color3("3B08BC")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+1,_Y+1)+color1("8660BC")+blur(1)+bord(1)+color3("8660BC")+alpha1(130)+alpha3(130)+Clip,_TXT)
- if _i == 6:
- t1 = getBT(6)
- t2 = getKT(6,4)
- t3 = getSK(6,4)
- t4 = getET(6)
- if _j < 5:
- ass_main(ASS_BUF,SubL(_BT-30,_BT,3),an(5)+move(_X+100,_Y,_X,_Y)+color1("599130")+blur(1)+bord(1)+color3("599130"),_TXT)
- ass_main(ASS_BUF,SubL(_BT-30,_BT,2),an(5)+move(_X+100+1,_Y+1,_X+1,_Y+1)+color1("315D16")+blur(1)+bord(1)+color3("315D16")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_ET,3),an(5)+pos(_X,_Y)+color1("599130")+blur(1)+bord(1)+color3("599130"),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_ET,2),an(5)+pos(_X+1,_Y+1)+color1("315D16")+blur(1)+bord(1)+color3("315D16")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,1),an(5)+pos(_X,_Y)+color1("032C03")+blur(2)+bord(3)+color3("032C03")+alpha1(200)+fscx(50)+fscy(50)+frz(45)+animation(fscx(150)+fscy(150)+frz(405)),"{\p1}m 0 0 l 30 0 l 30 30 l 0 30 l 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_ET,_ET+20,2),an(5)+pos(_X,_Y)+color1("599130")+blur(1)+bord(1)+color3("599130")+fad(0,200),_TXT)
- ass_main(ASS_BUF,SubL(_ET,_ET+20,1),an(5)+pos(_X+4,_Y+4)+color1("032C03")+blur(1)+bord(1)+color3("032C03")+alpha1(130)+alpha3(130)+fad(0,200),_TXT)
- else:
- for i in range(t1+t2+t3,t4):
- ass_main(ASS_BUF,SubL(i,i+20,10),an(5)+move(_X,_Y,_X+randint(-8,8),_Y+randint(-8,8))+alpha(170)+bord(1)+color1("FFFFFF")+color3("FFFFFF")+alpha3(150)+blur(1)+fad(0,200),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4+20,10),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("FFFFFF")+color3("FFFFFF")+fad(0,200), _TXT)
- if _i == 7:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,2),an(5)+move(_X,_Y+70,_X,_Y)+bord(1)+blur(1)+color1("DA95DD")+color3("DA95DD")+fad(300,0), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK,1),an(5)+move(_X+4,_Y+74,_X+4,_Y+4)+bord(1)+blur(1)+color1("A86E99")+color3("A86E99")+alpha1(130)+alpha3(130)+fad(300,0), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("DA95DD")+color3("DA95DD")+fad(0,300), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("A86E99")+color3("A86E99")+alpha1(130)+alpha3(130)+fad(0,300), _TXT)
- for i in range (20):
- RAN1 = randint(150,200)
- RAN2 = randint(30,60)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET + 20,0),an(5)+move(_X,_Y,_X+randint(-150,150),_Y+randint(0,80))+fscx(RAN1)+fscy(RAN1)+fr(0)+bord(0)+be(1)+blur(1)+color1("FDFCDF")+animation(fr(360)+fscx(RAN2)+fscy(RAN2))+fad(200,300),"{\p1}"+sakura[0]+"{\p0}")
- if _i == 8:
- RAN1 = randint(-10,50)
- RAN2 = randint(0,30)
- RAN3 = randint(-30,0)
- if RAN1 < 20:
- ass_main(ASS_BUF,SubL(_BT,_ET),an(5)+move(_X,_Y+RAN1,_X,_Y+RAN2)+bord(1)+blur(1)+color1("FFFFFF")+color3("FFFFFF")+fad(300,300),_TXT)
- else:
- ass_main(ASS_BUF,SubL(_BT,_ET),an(5)+move(_X,_Y+RAN1,_X,_Y+RAN3)+bord(1)+blur(1)+color1("FFFFFF")+color3("FFFFFF")+fad(300,300),_TXT)
- if _i == 9:
- t1 = getBT(9) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(9,3) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(9,3) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(9) #獲取第i行字幕的結束時間
- if _j < 4:
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,2),an(5)+move(_X+int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("E0C3A0")+color3("E0C3A0")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100)),_TXT)
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,1),an(5)+move(_X+int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("887E74")+color3("887E74")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100))+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("E0C3A0")+color3("E0C3A0"),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("887E74")+color3("887E74")+alpha1(130)+alpha3(130),_TXT)
- for k in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+k), int(_X+_A/2), int(_Y-_Fs/2+k+1))
- for h in range(_ET,_ET+30,step):
- t5 = h
- t6 = t5 + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t5,t6,2),an(5)+pos(_X+RAN1,_Y)+color1("E0C3A0")+blur(1)+bord(1)+color3("E0C3A0")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t5,t6,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("887E74")+blur(1)+bord(1)+color3("887E74")+alpha1(130)+alpha3(130)+Clip,_TXT)
- else:
- ass_main(ASS_BUF,SubL(t1+t2+t3-30,t4,2),an(5)+move(_X-int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("420087")+color3("420087")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100)),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3-30,t4,1),an(5)+move(_X-int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("ECBBDF")+color3("ECBBDF")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100))+alpha1(130)+alpha3(130),_TXT)
- for k in range(int(_Fs)):
- Clip = clip(int(_X-_A / 2), int(_Y-_Fs/2+k), int(_X+_A/2), int(_Y-_Fs/2+k+1))
- for h in range(_ET,_ET+30,step):
- t5 = h
- t6 = t5 + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t5,t6,2),an(5)+pos(_X+RAN1,_Y)+color1("420087")+blur(1)+bord(1)+color3("420087")+Clip,_TXT)
- ass_main(ASS_BUF,SubL(t5,t6,1),an(5)+pos(_X+RAN1+4,_Y+4)+color1("ECBBDF")+blur(1)+bord(1)+color3("ECBBDF")+alpha1(130)+alpha3(130)+Clip,_TXT)
- if _i == 10:
- ass_main(ASS_BUF,SubL(_BT+_SK-10,_ET),an(5)+pos(_X,_Y)+bord(0)+frx(25)+frz(50)+frz(-30)+color1("FFFFFF")+fad(200,0)+animation(0,_KT * 10 + 100,frx(0)+frz(0)+fry(0)+bord(1)+color3("FFFFFF")+blur(1)),_TXT)
- for i in range(30):
- R = RandCir2(_X, _Y, 20, 60)
- ass_main(ASS_BUF,SubL(_ET,_ET+30),an(5)+move(_X,_Y,R[0],R[1])+color1("FFFDD")+color3("C91409")+bord(2)+blur(4)+be(10),'{\p1}m 0 0 l 1 0 1 1 0 1{\p0}')
- if _i == 11:
- t1 = getBT(11) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(11,3) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(11,3) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(11) #獲取第i行字幕的結束時間
- if _j < 6:
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,2),an(5)+move(_X+int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("BD735B")+color3("BD735B")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100)),_TXT)
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,1),an(5)+move(_X+int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("A49F9B")+color3("A49F9B")+fad(300,0)+fscx(150)+fscy(150)+animation(fscx(100)+fscy(100))+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("BD735B")+color3("BD735B")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("A49F9B")+color3("A49F9B")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- else:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_ET,2),an(5)+move(_X+int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("6C55DC")+color3("6C55DC")+fad(300,0)+fscx(150)+fscy(150)+animation(300,_KT * 10 + 300,fscx(100)+fscy(100))+fad(0,300),_TXT)
- if _i == 12:
- t1 = getBT(12) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(12,2) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(12,2) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(12) #獲取第i行字幕的結束時間
- t5 = getKT(12,6) #獲取第i行第j個字(詞)的K時間
- t6 = getSK(12,6) #獲取第i行第j個字(詞)之前的K時間總和
- if _j < 3:
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,2),an(5)+move(_X-int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("2708C8")+color3("2708C8")+fad(300,0)+fscx(100)+fscy(100)+animation(fscx(150)+fscy(150)),_TXT)
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,1),an(5)+move(_X-int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("BC9BA7")+color3("BC9BA7")+fad(300,0)+fscx(100)+fscy(100)+animation(fscx(150)+fscy(150))+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("2708C8")+color3("2708C8")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("BC9BA7")+color3("BC9BA7")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- if _j > 2 and _j < 7:
- ass_main(ASS_BUF,SubL(t1+t2+t3-30,t1+t5+t6,2),an(5)+move(_X+int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("73EAC0")+color3("73EAC0")+fad(300,0)+fscx(100)+fscy(100)+animation(fscx(150)+fscy(150)),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3-30,t1+t5+t6,1),an(5)+move(_X+int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("74A98C")+color3("74A98C")+fad(300,0)+fscx(100)+fscy(100)+animation(fscx(150)+fscy(150))+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t5+t6,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("73EAC0")+color3("73EAC0")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t5+t6,t4,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("74A98C")+color3("74A98C")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- if _j > 6 and _j < 8:
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET),an(5)+pos(_X,_Y)+bord(2)+color1("000000")+color3("FFFFFF")+fsc(100,100)+animation(0,_KT * 5,fsc(70,70))+animation(_KT * 5,_KT * 10,fsc(100,100)+color1("FFFFFF")+color3("000000"))+fad(0,300),_TXT)
- else:
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET),an(5)+pos(_X,_Y)+bord(2)+color1("FFFFFF")+color3("000000")+fsc(100,100)+animation(0,_KT * 5,fsc(70,70))+animation(_KT * 5,_KT * 10,fsc(100,100)+color1("000000")+color3("FFFFFF"))+fad(0,300),_TXT)
- if _i == 13:
- t1 = getBT(13) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(13,1) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(13,1) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(13) #獲取第i行字幕的結束時間
- t5 = getKT(13,3) #獲取第i行第j個字(詞)的K時間
- t6 = getSK(13,3) #獲取第i行第j個字(詞)之前的K時間總和
- if _j < 2:
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,2),an(5)+move(_X-int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("9D2636")+color3("9D2636")+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(t1-30,t1+t2+t3,1),an(5)+move(_X-int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("51098E")+color3("51098E")+fad(300,0)+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("9D2636")+color3("9D2636")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("51098E")+color3("51098E")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- if _j > 1 and _j < 4:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK+_KT,2),an(5)+move(_X-int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("9D2636")+color3("9D2636")+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_BT+_SK+_KT,1),an(5)+move(_X-int(_ResolutionX/2)+4,_Y+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("51098E")+color3("51098E")+fad(300,0)+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("9D2636")+color3("9D2636")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_X+4,_Y+4)+bord(1)+blur(1)+color1("51098E")+color3("51098E")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- if _j > 3:
- ass_main(ASS_BUF,SubL(t1+t5+t6-30,t4,2),an(5)+move(_X,_Y+50,_X,_Y,0,300)+bord(1)+blur(1)+color1("DAADB1")+color3("DAADB1")+fad(300,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t5+t6-30,t4,1),an(5)+move(_X+4,_Y+50+4,_X+4,_Y+4,0,300)+bord(1)+blur(1)+color1("912431")+color3("912431")+fad(300,300)+alpha1(130)+alpha3(130),_TXT)
- if _i == 14:
- t1 = getBT(14) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(14,2) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(14,2) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(14) #獲取第i行字幕的結束時間
- if _j < 3:
- ass_main(ASS_BUF,SubL(_BT-30,_ET,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("DCAAED")+color3("DCAAED")+fad(300,300),_TXT)
- else:
- ass_main(ASS_BUF,SubL(_BT+_SK-30,_ET,2),an(5)+move(_X+int(_ResolutionX/2),_Y,_X,_Y,0,300)+bord(1)+blur(1)+color1("7A7CC7")+color3("7A7CC7")+fad(300,300),_TXT)
- if _i == 15:
- t1 = getBT(15) #獲取第i行字幕的開始時間 (以下 i j 之類的均從0開始數)
- t2 = getKT(15,5) #獲取第i行第j個字(詞)的K時間
- t3 = getSK(15,5) #獲取第i行第j個字(詞)之前的K時間總和
- t4 = getET(15) #獲取第i行字幕的結束時間
- if _j < 6:
- ass_main(ASS_BUF,SubL(t1-30,t1+(t2+t3)/2,2),an(5)+move(_X-10,_Y,_X-20,_Y-10)+bord(1)+blur(1)+color1("EBC2E4")+color3("EBC2E4")+fad(300,0),_TXT)
- ass_main(ASS_BUF,SubL(t1-30,t1+(t2+t3)/2,1),an(5)+move(_X-10+6,_Y+6,_X+6-20,_Y+6-10)+bord(1)+blur(1)+color1("632390")+color3("632390")+fad(300,0)+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+(t2+t3)/2,t1+t2+t3,2),an(5)+move(_X-20,_Y-10,_X,_Y)+bord(1)+blur(1)+color1("EBC2E4")+color3("EBC2E4"),_TXT)
- ass_main(ASS_BUF,SubL(t1+(t2+t3)/2,t1+t2+t3,1),an(5)+move(_X-20+6,_Y+6-10,_X+6,_Y+6)+bord(1)+blur(1)+color1("632390")+color3("632390")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,2),an(5)+pos(_X,_Y)+bord(1)+blur(1)+color1("EBC2E4")+color3("EBC2E4")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(t1+t2+t3,t4,1),an(5)+pos(_X+6,_Y+6)+bord(1)+blur(1)+color1("632390")+color3("632390")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- else:
- ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+20),move(_X,0,_X,_Y)+org(_X,_Y)+an(5)+animation(0,100,fscx(130)+fscy(75)+frz(-30))+animation(100,200,fscx(80)+fscy(120)+frz(20))+animation(200,300,fscx(100)+fscy(100)+frz(0))+color1("DC00A2")+color3("FBB9EF")+bord(1)+blur(1), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+20,_ET),an(5)+pos(_X,_Y)+color1("DC00A2")+color3("FBB9EF")+bord(1)+blur(1)+fad(0,300), _TXT)
- if _i == 16:
- if _j < 6:
- ass_main(ASS_BUF,SubL(_BT,_BT+_SK,2),an(5)+pos(_X,_Y-2-(_j * 2))+bord(0)+color1("9A94DC"),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_BT+_SK,1),an(5)+pos(_X+2,_Y-2-(_j * 2)+2)+bord(0)+color1("160C75")+alpha1(130)+alpha3(130),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,2),an(5)+move(_X,_Y-2-(_j * 2),_X,_Y,0,_KT * 10)+bord(0)+color1("9A94DC")+fad(0,300),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_ET,1),an(5)+move(_X+2,_Y-2-(_j * 2)+2,_X,_Y,0,_KT * 10)+bord(0)+color1("160C75")+fad(0,300)+alpha1(130)+alpha3(130),_TXT)
- else:
- for j in range(_BT+_SK,_ET,step):
- t = j
- t1 = t + step
- ass_main(ASS_BUF,SubL(t,t1),an(5)+pos(_X+randint(-3,3),_Y+randint(-3,3))+color1("FFFFFF")+color3("FFFFFF")+bord(2)+be(3)+blur(4) ,_TXT)
- if _i == 17:
- ass_main(ASS_BUF,SubL(_BT,_ET,2),an(5)+move(_X+150,_Y,_X-150,_Y)+color1("9B5814")+color3("9B5814")+bord(1)+blur(1)+fsc(100,100)+animation(_SK * 10,(_SK * 10) + (_KT * 5),fsc(130,130))+animation((_SK * 10) + (_KT * 5),(_SK * 10) + (_KT * 10),fsc(100,100)),_TXT)
- ass_main(ASS_BUF,SubL(_BT,_ET,2),an(5)+move(_X+150+3,_Y+3,_X-150+3,_Y+3)+color1("FFFFFF")+color3("FFFFFF")+bord(1)+blur(1)+fsc(100,100)+animation(_SK * 10,(_SK * 10) + (_KT * 5),fsc(130,130))+animation((_SK * 10) + (_KT * 5),(_SK * 10) + (_KT * 10),fsc(100,100))+alpha1(130)+alpha3(130),_TXT)
- if _i == 18:
- ass_main(ASS_BUF,SubL(_BT+_SK-40,_BT+_SK),an(5)+pos(_X,_Y)+color1("F8A8F2")+color3("F8A8F2")+bord(1)+blur(1)+fsc(160,160)+fad(300,0)+animation(fsc(100,100)),_TXT)
- for j in range(_BT+_SK,_ET,step):
- t = j
- t1 = t + step
- RAN1 = randint(-3,3)
- ass_main(ASS_BUF,SubL(t,t1,2),an(5)+pos(_X+RAN1,_Y+RAN1)+color1("F8A8F2")+color3("F8A8F2")+bord(1)+blur(1),_TXT)
- ass_main(ASS_BUF,SubL(t,t1,1),an(5)+pos(_X+RAN1+3,_Y+RAN1+3)+color1("EBE4E5")+color3("EBE4E5")+bord(1)+blur(1)+alpha1(130)+alpha3(130),_TXT)
-
- return (ASS_BUF,None)
复制代码 视频下载地址
没啥新鲜东西,就是写的细了点...模仿视频里的原效果了 |
-
3
查看全部评分
-
|