ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+90,2),an(1)+blur(2)+move(_X-20,_Y,_X+randint(-600,0),_Y+randint(-50,50))+t(fsc(0,0))+t(frxyz())+color3("000000")+fad(0,300)+fsc(40,40),"{\p3}m 0 0 l 50 49 l 100 0 l 51 50 l 100 100 l 50 51 l 0 100 l 49 50 l 0 0 m 45 45")
ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+90,2),an(1)+blur(4)+bord(1.5)+move(_X-20,_Y,_X+randint(-600,0),_Y+randint(-50,50))+t(fsc(0,0)+frxyz())+color3("D080C7")+fad(0,300),"{\p3}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")
ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+90,2),an(1)+blur(1)+bord(1.5)+move(_X-20,_Y,_X+randint(-600,0),_Y+randint(-50,50))+t(fsc(0,0)+frxyz())+color3("5D4740")+fad(0,300),"{\p3}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")
ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT+90,2),an(1)+blur(4)+bord(1.5)+move(_X-20,_Y,_X+randint(-600,0),_Y+randint(-50,50))+t(fsc(0,0)+frxyz())+color3("76BDB2")+fad(0,300),"{\p3}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")
ass_main(ASS_BUF, SubL(_BT+_SK-10,_BT+_SK+_KT+randint(0,80),1, Pix_Style),an(7)+move(PosX,PosY,PosX-randint(-20,20),PosY+30+randint(-20,20))+fad(0,300+randint(-100,100))+alpha(255-PixA)+blur(1)+shad(0)+bord(0)+color1("00FFFF"), "{\p4}m 7 0 b 2 0 1 4 1 6 b 1 8 2 12 7 12 b 12 12 13 8 13 6 b 13 4 12 0 7 0 ")
for j in range(math.ceil(_KT)):
J = [math.ceil(_KT)]
step1 = (_KT*10*(j-1)/(max(J)*10-1))
XC1= _X+_A*(j+1)/max(J)-_A
YC1= _Y+_Fs*(j-1)/max(J)*(-1)**_j*0.3
XC2= _X-randint(90,160)
YC2= _Y+randint(-40,40)
CurveMove = move(XC1,YC1,XC2,YC2)
ass_main(ASS_BUF,SubL(_BT+_SK+step1,_BT+_SK+_KT+step1+80,2),an(5)+blur(4)+bord(0.5)+vc1("00FFFF","00FFFF","FFFFFF","FFFFFF")+fad(0,300)+frxyz()+color3("00FFFF")+CurveMove,"{\p3}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")
ass_main(ASS_BUF,SubL(start ,end,2),an(5)+blur(4)+bord(0.5)+shad(0)+fad(300,300)+frxyz()+color("FFFFFF")+color3("BCB4FB")+fsc(randint(120,170),randint(120,170))+move(_X+sx,_Y+sy,_X+sx,_Y+sy2)+blink,"{\p3}m 30 23 b 24 23 24 33 30 33 b 36 33 37 23 30 23 m 35 27 l 61 28 l 35 29 m 26 27 l 0 28 l 26 29 m 29 23 l 30 0 l 31 23 m 29 33 l 30 57 l 31 33")
if _i == 13 and _j > 11:
for j in range(20):
ass_main(ASS_BUF,SubL(_BT+_SK+randint(-20,-10),_BT+_SK+_KT+randint(50,70),2),an(5)+blur(random.uniform(1, 4))+bord(random.uniform(0,1))+shad(0)+fs(0)+fad(300,300)+move(_X+randint(-10,10),_Y-randint(-10,10),_X+randint(-100,100),_Y+randint(-70,70))+t(fs(0)+frxyz())+color1("00FFFF")+color3("00FFFF"),"{\p2}m 21 -2 b 18 -1 13 7 14 7 l 14 5 b 12 8 12 14 12 14 l 14 16 l 12 15 b 11 20 14 23 14 23 l 12 22 b 12 23 14 25 15 25 l 14 25 b 15 26 16 27 16 27 b 17 28 19 33 20 36 l 21 36 b 20 34 18 30 17 26 b 19 25 20 22 22 20 l 20 20 l 22 18 l 21 18 b 23 15 23 13 23 10 l 22 8 l 23 8 b 24 8 23 4 23 3 l 21 4 l 22 1 l 21 -2 m 20 3 b 17 8 16 16 17 22 b 16 23 15 7 20 3")
刚学这个脚本,新手问:为什么我用这个脚本出现下面的错误:
TCAX version 1.2.0 [2012-08-03] [Anniversary]
(C) Copyright 2009-2012 milkyjing
Traceback (most recent call last):
File "E:\studio\Subtitles\tcaxDon\theDawn\part2.py", line 52, in tcaxPy_Main
ass_main(ASS_BUF,SubL(_BT+_j*5-_n*5,_BT+_SK,1),an(5)+b(1)+bord(0)+blur(0)+po
s(_X,_Y)+alpha(255)+color1("000000")+t(0,5+_SK*1.28,alpha(0)) ,_TXT)#入场效果
TypeError: b() takes no arguments (1 given)
Fatal Error: failed to execute the tcaxPy_Main() function in the 1(th) user tcax
py script.
INFO: Task failed!
搞清楚原因了,def alt必须放到def alpha后面(如图2,def alpha在第645行,def alt在第660行)才不会出现name 'alpha' is not defined(名称alpha未定义)的情况。
因为def alt本身是一个带有多个变量的复合函数,其中用到的变量对应的函数(比如alpha变量对应的def alpha)若是被放到def alt后面的位置就会无法顺利读取,导致出现name 'alpha' is not defined(名称alpha未定义)的情况。