TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

 找回密码
 新人加入
查看: 4856|回复: 0
打印 上一主题 下一主题

[完整特效] [SAI]012_nurarihyonnomakoOP2 [复制链接]

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

跳转到指定楼层
楼主
发表于 2011-10-22 18:46:52 |只看该作者 |正序浏览
預覽:http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview
  1. from tcaxPy import *

  2. def tcaxPy_Init():
  3.     # Tips: initialize your global variables here
  4.     global _FontSize
  5.     global pyFont
  6.     _FontSize = GetVal(val_FontSize)
  7.     pyFont    = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), GetVal(val_FontSize), GetVal(val_Spacing), GetVal(val_SpaceScale), 0x0000FF, 0, 0)


  8. def tcaxPy_Main(_I, _J, _N, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
  9.     ASS_BUF = []        # used for saving ASS FX lines
  10.     global _FontSize
  11.     global pyFont
  12.     _FontSize = GetVal(val_FontSize)
  13.     pyFont    = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), GetVal(val_FontSize), GetVal(val_Spacing), GetVal(val_SpaceScale), 0x0000FF, 0, 0)


  14.     if _I < 2:
  15.         if _TXT[0] == "s" :
  16.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X-30, _Y),"sunsh")
  17.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X+26, _Y),"i")
  18.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X+50, _Y),"ne")
  19.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X-30, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"sunsh")
  20.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+26, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"i")
  21.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+50, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"ne")

  22.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X-30, _Y),"sunsh")
  23.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+26, _Y),"i")
  24.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+50, _Y),"ne")




  25.         else:
  26.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X, _Y),_TXT)

  27.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),_TXT)
  28.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X, _Y),_TXT)
  29.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  30.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  31.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  32.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  33.         if _TXT[0] == "て":
  34.             A = 82
  35.             B = 82+55
  36.             ass_main(ASS_BUF, SubL(_BT+_SK+A,_BT+_SK+40+A,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  37.             ass_main(ASS_BUF, SubL(_BT+_SK+A,_BT+_SK+40+A,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  38.             ass_main(ASS_BUF, SubL(_BT+_SK+A,_BT+_SK+40+A,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  39.             ass_main(ASS_BUF, SubL(_BT+_SK+A,_BT+_SK+40+A,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  40.             ass_main(ASS_BUF, SubL(_BT+_SK+B,_BT+_SK+40+B,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  41.             ass_main(ASS_BUF, SubL(_BT+_SK+B,_BT+_SK+40+B,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  42.             ass_main(ASS_BUF, SubL(_BT+_SK+B,_BT+_SK+40+B,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  43.             ass_main(ASS_BUF, SubL(_BT+_SK+B,_BT+_SK+40+B,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  44.         elif _TXT == "Yeah":
  45.             sb1=""
  46.             for i in range (0,30):
  47.                 a = -0.15+0.01*i
  48.                 l = (pow((abs(a)/0.15),0.3)+0.5)*120*8
  49.                 sb1= sb1 + "m 0 0 l"+" "+str(int(l*cos(a)))+" "+str(int(l*sin(a)))+" 0 1 c "
  50.             sb2 = ""
  51.             for j in range (0,30):
  52.                 a = -0.15+0.01*j
  53.                 l = (pow((abs(a)/0.15),0.3)+0.5)*60*8
  54.                 sb2 = sb2 +"m 0 0 l"+" "+str(int(l*cos(a)))+" "+str(int(l*sin(a)))+" 0 1 c "




  55.             tStep = 2
  56.             for ptt0 in range(_BT+_SK - 10,_BT+_SK+_KT,tStep):

  57.                 startag = randint(0, 359)
  58.                 endag = startag + randint(0,9)/10 * randint(50, 100)
  59.                 ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,19), pos(_X, _Y)+ an(7)+fad(300, 300)+alpha1(0)+be(1)+shad(0)+bord(0)+color1("FF7C00")+ frz(startag) + t1(0,1000,frz(endag)),"{\p4}"+sb1)
  60.                 ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,20), pos(_X, _Y)+ an(7)+fad(300, 300)+alpha1(17)+be(1)+shad(0)+bord(0)+color1("FFFFFF")+ frz(startag) + t1(0,1000,frz(endag)),"{\p4}"+sb2)


  61.     elif _I < 10:
  62.         if _TXT[0] == "S" or _TXT[0] == "G" or _TXT[0] == "K":

  63.             
  64.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,30), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  65.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,30), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  66.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,30), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  67.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,30), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")



  68.         if _TXT[0] !="" :


  69.             ass_main(ASS_BUF, SubL(_BT+_J*5,_BT+_SK,22), pos(_X, _Y)+shad(0),_TXT)

  70.             ass_main(ASS_BUF, SubL(_BT+_SK,_ET-5*(_N-_J),27), pos(_X, _Y)+K(_KT)+shad(0)+color2("000000")+alpha1(255),_TXT)
  71.             PIX = TextPix(pyFont, _TXT)
  72.             InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]                # left most position of the pixels in PIX
  73.             InitPosY = _Y - int(_FontSize / 2 + 0.5) + PIX[0][1]        # upper most position of the pixels in PIX
  74.             X_list = []
  75.             Y_list = []
  76.             for h in range(PIX[1][1]):
  77.                 PosY  = InitPosY + h                                        # y-position of the current pixel
  78.                 for w in range(PIX[1][0]):
  79.                     PosX = InitPosX + w                                        # x-position of the current pixel
  80.                     X = PosX-60+randint(-30,30)
  81.                     Y = PosY-50+randint(-15,15)
  82.         
  83.                     idx  = 4 * (h * PIX[1][0] + w)
  84.                     PixR = PIX[2][idx + 0]
  85.                     PixG = PIX[2][idx + 1]
  86.                     PixB = PIX[2][idx + 2]
  87.                     PixA = PIX[2][idx + 3]
  88.                     if PixA == 255:
  89.                         rnd = randint(-10,10)
  90.                         ass_main(ASS_BUF, SubL(int(_BT+_SK+w*(_KT/PIX[1][0])),int(_BT+_SK+100+rnd+w*(_KT/PIX[1][0])),25),mov(PosX,PosY,X,Y)+fad(0,300)+shad(0)+bord(0)+color3("FFFFFF")+color1("FFFFFF"), PixPt())

  91.                         ass_main(ASS_BUF, SubL(_BT+_SK,int(_BT+_SK+w*(_KT/PIX[1][0])),26),pos(PosX,PosY)+shad(0)+bord(0)+color3("FFFFFF")+color1("FFFFFF"), PixPt())
















  92.         
  93.     elif _I < 14:   
  94.         if _TXT[0] == "s" :
  95.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X-30, _Y)+shad(1)+blur(5)+bord(3)+color3("FFFFFF")+alpha1(255)+color1("FFFFFF")+fsc(100,130)+t1(200,_KT*10,fsc(100,100)),"sunsh")
  96.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+26, _Y)+shad(1)+blur(5)+bord(3)+color3("FFFFFF")+alpha1(255)+color1("FFFFFF")+fsc(100,130)+t1(200,_KT*10,fsc(100,100)),"i")
  97.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+50, _Y)+shad(1)+blur(5)+bord(3)+color3("FFFFFF")+alpha1(255)+color1("FFFFFF")+fsc(100,130)+t1(200,_KT*10,fsc(100,100)),"ne")



  98.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X-30, _Y),"sunsh")
  99.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+26, _Y),"i")
  100.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+50, _Y),"ne")


  101.         elif _TXT[0] =="T":

  102.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X, _Y)+shad(1)+blur(5)+bord(3)+color3("FFFFFF")+alpha1(255)+color1("FFFFFF")+fsc(100,130)+t1(200,_KT*10,fsc(100,100)),_TXT)


  103.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X, _Y),_TXT)
  104.         else:
  105.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X, _Y)+shad(1)+blur(5)+bord(3)+color3("FFFFFF")+alpha1(255)+color1("FFFFFF")+fsc(130,130)+t1(200,_KT*10,fsc(100,100)),_TXT)


  106.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X, _Y),_TXT)
  107.         X = t1(0,100,alpha1(255)+alpha3(255))+t1(100,200,alpha1(0)+alpha3(0))+t1(200,300,alpha1(255)+alpha3(255))+t1(300,400,alpha1(0)+alpha3(0))+t1(400,500,alpha1(255)+alpha3(255))+t1(500,600,alpha1(0)+alpha3(0))+t1(600,700,alpha1(255)+alpha3(255))+t1(700,800,alpha1(0)+alpha3(0))+t1(800,900,alpha1(255)+alpha3(255))+t1(900,1000,alpha1(0)+alpha3(0))


  108.         for i in range(29):
  109.             R = RandCir(_X+3,_Y+3, 45)
  110.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,20), mov(_X+3,_Y+3,R[0],R[1])+fad(40,400)+bord(2.5)+blur(2.5)+fsc(100,100)+color3("FFFFFF")+color1("FFFFFF")+shad(0),'{\p2}m 0 -5 b -8 7 8 7 0 -5{\p0}')   
  111.     else:
  112.         sb1=""
  113.         for i in range (0,30):
  114.             a = -0.15+0.01*i
  115.             l = (pow((abs(a)/0.15),0.3)+0.5)*120*8
  116.             sb1= sb1 + "m 0 0 l"+" "+str(int(l*cos(a)))+" "+str(int(l*sin(a)))+" 0 1 c "
  117.         sb2 = ""
  118.         for j in range (0,30):
  119.             a = -0.15+0.01*j
  120.             l = (pow((abs(a)/0.15),0.3)+0.5)*60*8
  121.             sb2 = sb2 +"m 0 0 l"+" "+str(int(l*cos(a)))+" "+str(int(l*sin(a)))+" 0 1 c "



  122.         tStep = 2
  123.         for ptt0 in range(_BT+_SK - 10,_BT+_SK+_KT,tStep):

  124.             startag = randint(0, 359)
  125.             endag = startag + randint(0,9)/10 * randint(50, 100)
  126.             ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,19), pos(_X, _Y)+ an(7)+fad(300, 300)+alpha1(0)+be(1)+shad(0)+bord(0)+color1("C400C4")+ frz(startag) + t1(0,1000,frz(endag)),"{\p4}"+sb1)
  127.             ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,20), pos(_X, _Y)+ an(7)+fad(300, 300)+alpha1(17)+be(1)+shad(0)+bord(0)+color1("FFFFFF")+ frz(startag) + t1(0,1000,frz(endag)),"{\p4}"+sb2)





  128.         if _TXT[0] == "s" :
  129.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X-30, _Y),"sunsh")
  130.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X+26, _Y),"i")
  131.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X+50, _Y),"ne")
  132.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X-30, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"sunsh")
  133.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+26, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"i")
  134.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X+50, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),"ne")

  135.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X-30, _Y),"sunsh")
  136.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+26, _Y),"i")
  137.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X+50, _Y),"ne")

  138.         else:
  139.             ass_main(ASS_BUF, SubL(_BT,_BT+_SK,22), pos(_X, _Y),_TXT)

  140.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,22), pos(_X, _Y)+shad(0)+blur(5)+bord(3)+color3("FFFFFF")+color1("FFFFFF"),_TXT)

  141.             ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,22), pos(_X, _Y),_TXT)
  142.    
  143.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  144.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(204)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(80,80)+t1(0,400,fsc(160,160)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
  145.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(2)+blur(1)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  146.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+40,23), pos(_X, _Y)+an(7)+shad(0)+alpha1(255)+alpha3(170)+fad(40,450)+color3("FFFFFF")+bord(5)+blur(2)+be(1)+fsc(60,60)+t1(0,400,fsc(20,20)),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")

  147.         for i in range(29):
  148.             R = RandCir(_X+3,_Y+3, 45)
  149.             ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+100,21), mov(_X+3,_Y+3,R[0],R[1])+fad(40,400)+bord(2.5)+blur(2.5)+fsc(100,100)+color3("FFFFFF")+color1("FFFFFF")+shad(0),'{\p2}m 0 -5 b -8 7 8 7 0 -5{\p0}')   

  150.     return (ASS_BUF, None)
复制代码
1

查看全部评分

Rank: 4

楼主
发表于 2022-2-2 11:09:23 |只看该作者
本帖最后由 Seekladoom 于 2022-2-2 11:10 编辑

【旋转光线】TCAX Karaoke Effect 237.rar (10.11 KB, 下载次数: 2175)
旋转光线特效:
  1. from tcaxPy import *

  2. def tcaxPy_Init():
  3.     pass

  4. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
  5.     ASS_BUF = []        # used for saving ASS FX lines
  6.    
  7.     DY = _Y - 13
  8.     sb1=''
  9.     for i in range (0,30):
  10.         a = -0.15+0.01*i
  11.         l = (pow((abs(a)/0.15),0.3)+0.5)*120*8
  12.         sb1= sb1 + 'm 0 0 l'+' '+str(int(l*cos(a)))+' '+str(int(l*sin(a)))+' 0 1 c '
  13.         
  14.     sb2 = ''
  15.     for j in range (0,30):
  16.         a = -0.15+0.01*j
  17.         l = (pow((abs(a)/0.15),0.3)+0.5)*60*8
  18.         sb2 = sb2 +'m 0 0 l'+' '+str(int(l*cos(a)))+' '+str(int(l*sin(a)))+' 0 1 c '

  19.     tStep = 2
  20.     for ptt0 in range(_BT+_SK - 10,_BT+_SK+_KT,tStep):
  21.         startag = randint(0, 359)
  22.         endtag = startag + randint(0,9)/10 * randint(50, 100)
  23.         ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,0), pos(_X, DY)+ an(7)+fad(300, 300)+alpha1(0)+be(1)+shad(0)+bord(0)+color1('FF7C00')+ frz(startag) + t1(0,1000,frz(endtag))+p(4),sb1)
  24.         ass_main(ASS_BUF, SubL(ptt0,ptt0 + 100,1), pos(_X, DY)+ an(7)+fad(300, 300)+alpha1(17)+be(1)+shad(0)+bord(0)+color1('FFFFFF')+ frz(startag) + t1(0,1000,frz(endtag))+p(4),sb2)

  25.     ass_main(ASS_BUF, SubL(_BT,_BT+_SK,2), pos(_X, DY),_TXT)
  26.     ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,2), pos(_X, DY)+shad(0)+blur(5)+bord(3)+color3('FFFFFF')+color1('FFFFFF'),_TXT)
  27.     ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET,2), pos(_X, DY),_TXT)

  28.     return (ASS_BUF, None)
复制代码
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-11-25 03:07

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH