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

 找回密码
 新人加入
查看: 3856|回复: 17

[完整特效] [SAI]005_seikonnoqwaserED1 [复制链接]

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

发表于 2011-10-22 19:26:49 |显示全部楼层
預覽:http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview

現在看到發現自己寫的腳本有多麼的蛋疼 這個用了tcs特效和現在的tcas 基本一樣 不過python32好像不能相對路徑了 反正圖片都沒有隨便看看。。。
  1. from tcaxPy import *
  2. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _7X, _7Y, _X, _Y, _A, _W, _H, _TXT, _J, _N):

  3.     ASS_BUF = []                # 用于保存ASS特效
  4.     TCAS_BUF = []                # 用于保存TCAS特效

  5.     if _i == 0:
  6.         Blur = blur(2)
  7.         Be = be(1)
  8.         Bord =bord(2)
  9.         for i in range(_H + 2):
  10.             CLIP = clip(_7X - 1-5, _7Y + i - 1, _7X + 1 + _H+5, _7Y + i)
  11.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  12.             for k in range(AdvInt(_KT/10)):
  13.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  14.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)   

  15.     elif _i == 1:
  16.         for k in range(12):
  17.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  18.             BegTime = _BT + k * 5
  19.             EndTime = _BT + (k+1) * 5
  20.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1),"Do Live Again")
  21.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1),"Do Live Again")

  22.     elif _i == 2:
  23.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  24.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  25.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), _TXT)
  26.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40), fad(100,0)+EFT2 + blur(2)+bord(2)+be(1), _TXT)
  27.         ass_main(ASS_BUF, SubL(_BT+40,_ET+105),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  28.     elif _i == 3:
  29.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  30.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  31.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)

  32.     elif _i == 4:
  33.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  34.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  35.         ass_main(ASS_BUF, SubL(_BT,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), _TXT)
  36.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40), fad(100,0)+EFT2 + blur(2)+bord(2)+be(1), _TXT)
  37.         ass_main(ASS_BUF, SubL(_BT+40,_ET), fad(100,0)+pos(_X+300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  38.     elif _i == 5:
  39.         PIX = TextPix(_FontFileName, _FaceID, _Fs, "I'm All", DecRGB('0000FF'), _Bd, True)
  40.         PIX = Pix_Blur(PIX, _Br)

  41.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  42.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  43.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  44.             PosY  = InitPosY + h
  45.                                                              # 当前像素Y轴坐标
  46.             for w in range(PIX[1][0]):                        # 开始横向扫描
  47.                 PosX = InitPosX + w       
  48.                 X =        PosX-randint(-15,15)
  49.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  50.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  51.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  52.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  53.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  54.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  55.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  56.                     M = mov(PosX,PosY,X,Y)

  57.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  58.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "I'm All")


  59.     elif _i == 6:
  60.         Blur = blur(2)
  61.         Be = be(1)
  62.         Bord =bord(2)
  63.         for i in range(_H + 2):
  64.             CLIP = clip(_7X - 1-5, _7Y + i - 1, _7X + 1 + _H+5, _7Y + i)
  65.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  66.             for k in range(AdvInt(_KT/10)):
  67.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  68.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)


  69.     elif _i == 7:
  70.         for k in range(12):
  71.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  72.             BegTime = _BT + k * 5
  73.             EndTime = _BT + (k+1) * 5
  74.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), _TXT)
  75.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1), _TXT)


  76.     elif _i == 8:
  77.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  78.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  79.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), "The Sun")
  80.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Sun")
  81.         ass_main(ASS_BUF, SubL(_BT+40,_ET+98),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), "The Sun")

  82.     elif _i == 9:
  83.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  84.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  85.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)
  86.     elif _i == 10:
  87.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  88.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  89.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Earth")
  90.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Earth")
  91.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), "The Earth")

  92.     elif _i == 11:

  93.         PIX = TextPix(_FontFileName, _FaceID, _Fs, "On Squall", DecRGB('0000FF'), _Bd, True)
  94.         PIX = Pix_Blur(PIX, _Br)


  95.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  96.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  97.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  98.             PosY  = InitPosY + h
  99.                                                              # 当前像素Y轴坐标
  100.             for w in range(PIX[1][0]):                        # 开始横向扫描
  101.                 PosX = InitPosX + w       
  102.                 X =        PosX-randint(-15,15)
  103.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  104.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  105.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  106.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  107.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  108.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  109.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  110.                     M = mov(PosX,PosY,X,Y)

  111.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "On Squall")

  112.     elif _i<16:
  113.         for s in range(AdvInt(((_ET-_BT-_SK)/20))):
  114.             BT = _BT+_SK+ s*20
  115.             ET = _BT+_SK+ (s+1)*20
  116.             EFT1 = t1(0, 100,bord(4)) + t1(100, 200, bord(0))
  117.             ass_main(ASS_BUF, SubL(BT,ET,1), pos(_X,_Y)+ alpha3(50) + EFT1 + blur(6) + be(1), _TXT)
  118.         ass_main(ASS_BUF, SubL(ET,_ET,2), pos(_X,_Y)+bord(4) + blur(6) + be(1), _TXT)
  119.    
  120.     elif _i<18:
  121.         ass_main(ASS_BUF, SubL(_BT+_SK,_ET), fad(200,0)+pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)
  122.         for i in range(37):
  123.             img_path = MakePath(5, i + 1, 'images', 'list', 'img', '.png', 'sys')
  124.             img_size = 4 * _Fs
  125.             PIX = ImagePix(img_path, img_size)
  126.             PIX = PixMultiRGBA(PIX, 1, 1, 1, (37 - i) / 37)   
  127.             tcs_main(TCS_BUF, PIX, 10 * (_BT + _SK) - 500 + i * _TimePF, 10 * (_BT + _SK) - 500  + (i + 1) * _TimePF, _X - PIX[1][0] / 2, _Y - PIX[1][1] / 2, 0)

  128.     elif _i == 18:
  129.         Blur = blur(2)
  130.         Be = be(1)
  131.         Bord =bord(2)
  132.         for i in range(_H + 2):
  133.             CLIP = clip(_7X - 1-5, _7Y + i - 1, _7X + 1 + _H+5, _7Y + i)
  134.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  135.             for k in range(AdvInt(_KT/10)):
  136.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  137.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)

  138.     elif _i == 19:
  139.         for k in range(12):
  140.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  141.             BegTime = _BT + k * 5
  142.             EndTime = _BT + (k+1) * 5
  143.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), "Get Back My Love")
  144.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1), "Get Back My Love")


  145.     elif _i == 20:
  146.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  147.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  148.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), _TXT)
  149.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), _TXT)
  150.         ass_main(ASS_BUF, SubL(_BT+40,_ET+99),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  151.     elif _i == 21:
  152.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  153.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), "My Lost")
  154.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), "My Lost")
  155.     elif _i == 22:
  156.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  157.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  158.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), _TXT)
  159.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), _TXT)
  160.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  161.     elif _i == 23:

  162.         PIX = TextPix(_FontFileName, _FaceID, _Fs, "So Fool", DecRGB('0000FF'), _Bd, True)
  163.         PIX = Pix_Blur(PIX, _Br)


  164.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  165.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  166.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  167.             PosY  = InitPosY + h
  168.                                                              # 当前像素Y轴坐标
  169.             for w in range(PIX[1][0]):                        # 开始横向扫描
  170.                 PosX = InitPosX + w       
  171.                 X =        PosX-randint(-15,15)
  172.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  173.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  174.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  175.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  176.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  177.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  178.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  179.                     M = mov(PosX,PosY,X,Y)

  180.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  181.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "So Fool")


  182.         
  183.     elif _i == 24:
  184.         Blur = blur(2)
  185.         Be = be(1)
  186.         Bord =bord(2)
  187.         for i in range(_H + 2):
  188.             CLIP = clip(_7X - 1-5, _7Y + i - 1, _7X + 1 + _H+5, _7Y + i)
  189.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  190.             for k in range(AdvInt(_KT/10)):
  191.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  192.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)  

  193.     elif _i == 25:
  194.         for k in range(12):
  195.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  196.             BegTime = _BT + k * 5
  197.             EndTime = _BT + (k+1) * 5
  198.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), _TXT)
  199.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1),  _TXT)



  200.     elif _i == 26:
  201.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  202.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  203.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Sun")
  204.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Sun")
  205.         ass_main(ASS_BUF, SubL(_BT+40,_ET+99),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), "The Sun")

  206.     elif _i == 27:
  207.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  208.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  209.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)

  210.     elif _i == 28:
  211.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  212.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  213.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Moon")
  214.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Moon")
  215.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), "The Moon")

  216.     elif _i == 29:
  217.         PIX = TextPix(_FontFileName, _FaceID, _Fs, "On Squall", DecRGB('0000FF'), _Bd, True)
  218.         PIX = Pix_Blur(PIX, _Br)

  219.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  220.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  221.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  222.             PosY  = InitPosY + h
  223.                                                              # 当前像素Y轴坐标
  224.             for w in range(PIX[1][0]):                        # 开始横向扫描
  225.                 PosX = InitPosX + w       
  226.                 X =        PosX-randint(-15,15)
  227.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  228.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  229.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  230.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  231.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  232.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  233.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  234.                     M = mov(PosX,PosY,X,Y)

  235.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  236.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "On Squall")



  237.     return (ASS_BUF, TCAS_BUF)               
复制代码
1

查看全部评分

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2011-10-22 20:21:47 |显示全部楼层
恩, Python32相对路径用起来有点问题, 所以后来增加了函数 abspath() 修正了这个问题...

用法, 只要在以往相对路径外加上 abspath(相对路径), 即可自动转化为绝对路径...

p.s. 之前这段代码第05行没对齐... 我编辑掉了...

正式会员

爱理人士

Rank: 4

发表于 2011-12-20 16:12:23 |显示全部楼层
又出错了!
005.jpg

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2011-12-20 16:58:58 |显示全部楼层
5231251 发表于 2011-12-20 16:12
又出错了!

参考: http://www.tcax.org/forum.php?mod=viewthread&tid=154

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

发表于 2011-12-20 23:21:48 |显示全部楼层
這個腳本舊了 看看就行了 沒有原來的工程文件 基本跑不起來

Rank: 4

发表于 2012-3-12 18:09:18 |显示全部楼层
本帖最后由 Mirael 于 2012-3-12 22:12 编辑

Have modified, but it does not work :(

1.png


I did like this:

I think it would be easier to include it in the older version ...

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-12 21:57:25 |显示全部楼层
Mirael 发表于 2012-3-12 18:09
Have modified, but it does not work :(

the error message says that you forget the indent... around the 47th line

Rank: 4

发表于 2012-3-12 22:15:55 |显示全部楼层
47th line -------->
  1. _FontFileName = GetVal(val_FontFileName)
复制代码

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-12 22:21:44 |显示全部楼层
Mirael 发表于 2012-3-12 22:15
47th line -------->


It's impossible to tell the problem, if you didn't paste a branch of code around the 47th line.

But I can guess that you probably copy the code from this post http://www.tcax.org/forum.php?mo ... d=599&fromuid=2, and paste to (replace) the elder script? If so, you should add four more white spaces to each of the line through the 47th line to the (47 + 7)th line. Sorry if I misunderstand the problem you are facing.

Rank: 4

发表于 2012-3-13 05:58:32 |显示全部楼层
A few bugs are fixed. ^_^'
On it sat a little, but still something is not right.
I can not say I was quite enlightened by the Buddha, but little understood.
And now, Milky-san please help.
  1. from tcaxPy import *

  2. def tcaxPy_Init():

  3.     global _FontFileName
  4.     global _FaceID
  5.     global _Fs
  6.     global _FD
  7.     global _Height
  8.     global _Font
  9.     global _FontSize
  10.     global pyFont
  11.     pyFont    = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), GetVal(val_FontSize), GetVal(val_Spacing), GetVal(val_SpaceScale), 0x0000FF, 0, 0)
  12.     _FontSize = GetVal(val_FontSize)
  13.     _FontFileName = GetVal(val_FontFileName)
  14.     _FaceID       = GetVal(val_FaceID)
  15.     _Fs           = GetVal(val_FontSize)
  16.     _FD = 1000 / GetVal(val_FXFPS)
  17.     _Height       = GetVal(val_TextHeight)
  18.     _Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)

  19. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
  20.     ASS_BUF = []                # 用于保存ASS特效
  21.     TCAS_BUF = []                # 用于保存TCAS特效  


  22.     if _i == 0:
  23.         Blur = blur(2)
  24.         Be = be(1)
  25.         Bord =bord(2)
  26.         for i in range(_H + 2):
  27.             CLIP = clip(_X - 1-5, _Y + i - 1, _X + 1 + _H+5, _Y + i)
  28.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  29.             for k in range(AdvInt(_KT/10)):
  30.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  31.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)   

  32.     elif _i == 1:
  33.         for k in range(12):
  34.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  35.             BegTime = _BT + k * 5
  36.             EndTime = _BT + (k+1) * 5
  37.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1),"Do Live Again")
  38.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1),"Do Live Again")

  39.     elif _i == 2:
  40.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  41.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  42.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), _TXT)
  43.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40), fad(100,0)+EFT2 + blur(2)+bord(2)+be(1), _TXT)
  44.         ass_main(ASS_BUF, SubL(_BT+40,_ET+105),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  45.     elif _i == 3:
  46.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  47.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  48.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)

  49.     elif _i == 4:
  50.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  51.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  52.         ass_main(ASS_BUF, SubL(_BT,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), _TXT)
  53.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40), fad(100,0)+EFT2 + blur(2)+bord(2)+be(1), _TXT)
  54.         ass_main(ASS_BUF, SubL(_BT+40,_ET), fad(100,0)+pos(_X+300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  55.    

  56.     elif _i == 5:
  57.             _Bd = GetVal(val_Bord)
  58.         _Br = GetVal(val_Blur)
  59.         PIX = TextPix(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), DecRGB('0000FF'), _Bd, True, _TXT)
  60.         PIX = PixBlur(PIX, _Br)

  61.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  62.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  63.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  64.             PosY  = InitPosY + h
  65.                                                              # 当前像素Y轴坐标
  66.             for w in range(PIX[1][0]):                        # 开始横向扫描
  67.                 PosX = InitPosX + w        
  68.                 X =        PosX-randint(-15,15)
  69.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  70.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  71.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  72.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  73.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  74.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  75.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  76.                     M = mov(PosX,PosY,X,Y)

  77.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  78.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "I'm All")


  79.     elif _i == 6:
  80.         Blur = blur(2)
  81.         Be = be(1)
  82.         Bord =bord(2)
  83.         for i in range(_H + 2):
  84.             CLIP = clip(_X - 1-5, _Y + i - 1, _X + 1 + _H+5, _Y + i)
  85.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  86.             for k in range(AdvInt(_KT/10)):
  87.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  88.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)


  89.     elif _i == 7:
  90.         for k in range(12):
  91.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  92.             BegTime = _BT + k * 5
  93.             EndTime = _BT + (k+1) * 5
  94.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), _TXT)
  95.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1), _TXT)


  96.     elif _i == 8:
  97.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  98.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  99.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20),fad(100,0)+ EFT1 + blur(2)+bord(2)+be(1), "The Sun")
  100.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Sun")
  101.         ass_main(ASS_BUF, SubL(_BT+40,_ET+98),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), "The Sun")

  102.     elif _i == 9:
  103.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  104.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  105.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)
  106.     elif _i == 10:
  107.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  108.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  109.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Earth")
  110.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Earth")
  111.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), "The Earth")

  112.     elif _i == 11:
  113.         _Bd = GetVal(val_Bord)
  114.         _Br = GetVal(val_Blur)
  115.         PIX = TextPix(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), DecRGB('0000FF'), _Bd, True, _TXT)
  116.         PIX = PixBlur(PIX, _Br)


  117.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  118.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  119.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  120.             PosY  = InitPosY + h
  121.                                                              # 当前像素Y轴坐标
  122.             for w in range(PIX[1][0]):                        # 开始横向扫描
  123.                 PosX = InitPosX + w        
  124.                 X =        PosX-randint(-15,15)
  125.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  126.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  127.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  128.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  129.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  130.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  131.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  132.                     M = mov(PosX,PosY,X,Y)

  133.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "On Squall")

  134.     elif _i<16:
  135.         for s in range(AdvInt(((_ET-_BT-_SK)/20))):
  136.             BT = _BT+_SK+ s*20
  137.             ET = _BT+_SK+ (s+1)*20
  138.             EFT1 = t1(0, 100,bord(4)) + t1(100, 200, bord(0))
  139.             ass_main(ASS_BUF, SubL(BT,ET,1), pos(_X,_Y)+ alpha3(50) + EFT1 + blur(6) + be(1), _TXT)
  140.         ass_main(ASS_BUF, SubL(ET,_ET,2), pos(_X,_Y)+bord(4) + blur(6) + be(1), _TXT)
  141.    
  142.     elif _i<18:
  143.         ass_main(ASS_BUF, SubL(_BT+_SK,_ET), fad(200,0)+pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)
  144.         for i in range(37):
  145.             img_path = MakePath(5, i + 1, 'images', 'list', 'img', '.png', 'sys')
  146.             img_size = 4 * _Fs
  147.             PIX = ImagePix(img_path, img_size)
  148.             PIX = PixMultiRGBA(PIX, 1, 1, 1, (37 - i) / 37)   
  149.             tcs_main(TCS_BUF, PIX, 10 * (_BT + _SK) - 500 + i * _TimePF, 10 * (_BT + _SK) - 500  + (i + 1) * _TimePF, _X - PIX[1][0] / 2, _Y - PIX[1][1] / 2, 0)

  150.     elif _i == 18:
  151.         Blur = blur(2)
  152.         Be = be(1)
  153.         Bord =bord(2)
  154.         for i in range(_H + 2):
  155.             CLIP = clip(_X - 1-5, _Y + i - 1, _X + 1 + _H+5, _Y + i)
  156.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  157.             for k in range(AdvInt(_KT/10)):
  158.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  159.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)

  160.     elif _i == 19:
  161.         for k in range(12):
  162.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  163.             BegTime = _BT + k * 5
  164.             EndTime = _BT + (k+1) * 5
  165.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), "Get Back My Love")
  166.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1), "Get Back My Love")


  167.     elif _i == 20:
  168.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  169.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  170.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), _TXT)
  171.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), _TXT)
  172.         ass_main(ASS_BUF, SubL(_BT+40,_ET+99),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  173.     elif _i == 21:
  174.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  175.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), "My Lost")
  176.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), "My Lost")
  177.     elif _i == 22:
  178.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  179.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  180.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), _TXT)
  181.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), _TXT)
  182.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), _TXT)

  183.     elif _i == 23:
  184.             _Bd = GetVal(val_Bord)
  185.         _Br = GetVal(val_Blur)
  186.         PIX = TextPix(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), DecRGB('0000FF'), _Bd, True, _TXT)
  187.         PIX = PixBlur(PIX, _Br)


  188.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  189.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  190.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  191.             PosY  = InitPosY + h
  192.                                                              # 当前像素Y轴坐标
  193.             for w in range(PIX[1][0]):                        # 开始横向扫描
  194.                 PosX = InitPosX + w        
  195.                 X =        PosX-randint(-15,15)
  196.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  197.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  198.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  199.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  200.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  201.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  202.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  203.                     M = mov(PosX,PosY,X,Y)

  204.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  205.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "So Fool")


  206.         
  207.     elif _i == 24:
  208.         Blur = blur(2)
  209.         Be = be(1)
  210.         Bord =bord(2)
  211.         for i in range(_H + 2):
  212.             CLIP = clip(_X - 1-5, _Y + i - 1, _X + 1 + _H+5, _Y + i)
  213.             M = t1(0,50,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(50,100,mov(_X,_Y,_X+randint(-2,2),_Y))+t1(100,150,mov(_X,_Y,_X+randint(-2,2),_Y))
  214.             for k in range(AdvInt(_KT/10)):
  215.                 ass_main(ASS_BUF, SubL(_BT+_SK+k*10,_BT+_SK+(k+1)*10),Be +Blur+ Bord + M +CLIP, _TXT)
  216.         ass_main(ASS_BUF, SubL(_BT+_SK+(k+1)*10,_ET),pos(_X,_Y)+Be +Blur+Bord, _TXT)  

  217.     elif _i == 25:
  218.         for k in range(12):
  219.             BEAT = t1(0,10,mov(_X,_Y,_X+randint(-5,5),_Y+randint(-5,5)))+t1(10,20,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(20,30,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(30,40,mov(_X+randint(-5,5),_Y+randint(-5,5),_X+randint(-5,5),_Y+randint(-5,5)))+t1(40,50,mov(_X+randint(-5,5),_Y+randint(-5,5),_X,_Y))
  220.             BegTime = _BT + k * 5
  221.             EndTime = _BT + (k+1) * 5
  222.             ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT+blur(2)+bord(2)+be(1), _TXT)
  223.         ass_main(ASS_BUF, SubL(EndTime, _ET),pos(_X,_Y)+blur(2)+bord(2)+be(1),  _TXT)



  224.     elif _i == 26:
  225.         EFT1 = mov(_X-300,0,_X-300,_Y)+ org(_X-300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  226.         EFT2 = pos(_X-300,_Y)+ org(_X-300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  227.         ass_main(ASS_BUF, SubL(_BT-10,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Sun")
  228.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Sun")
  229.         ass_main(ASS_BUF, SubL(_BT+40,_ET+99),fad(100,0)+ pos(_X-300,_Y) + blur(2)+bord(2)+be(1), "The Sun")

  230.     elif _i == 27:
  231.         EFT = an(5)+fscx(100)+fscy(100)+t1(0,100,fscx(200)+fscy(150))+t1(100,200,fscx(100)+fscy(100))
  232.         ass_main(ASS_BUF, SubL(_BT,_BT+20), fad(100,0)+pos(_X,_Y)+EFT + blur(2)+bord(2)+be(1), _TXT)
  233.         ass_main(ASS_BUF, SubL(_BT+20,_ET+41),fad(100,0)+ pos(_X,_Y) + blur(2)+bord(2)+be(1), _TXT)

  234.     elif _i == 28:
  235.         EFT1 = mov(_X+300,0,_X+300,_Y)+ org(_X+300 +5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(-10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  236.         EFT2 = pos(_X+300,_Y)+ org(_X+300 -5,_Y+5)+an(5)+t1(0,80,fscx(120)+fscy(70))+t1(80,160,fscx(80)+fscy(120)+frz(10))+t1(160,240,fscx(100)+fscy(100)+frz(0))
  237.         ass_main(ASS_BUF, SubL(_BT,_BT + 20), fad(100,0)+EFT1 + blur(2)+bord(2)+be(1), "The Moon")
  238.         ass_main(ASS_BUF, SubL(_BT + 20,_BT + 40),fad(100,0)+ EFT2 + blur(2)+bord(2)+be(1), "The Moon")
  239.         ass_main(ASS_BUF, SubL(_BT+40,_ET),fad(100,0)+ pos(_X+300,_Y) + blur(2)+bord(2)+be(1), "The Moon")

  240.     elif _i == 29:
  241.    
  242.         _Bd = GetVal(val_Bord)
  243.         _Br = GetVal(val_Blur)
  244.         PIX = TextPix(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), DecRGB('0000FF'), _Bd, True, _TXT)
  245.         PIX = PixBlur(PIX, _Br)

  246.         InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0]        # 第一个像素的X轴坐标
  247.         InitPosY = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]        # 第一个像素的Y轴坐标
  248.         for h in range(PIX[1][1]):                                # 开始纵向扫描
  249.             PosY  = InitPosY + h
  250.                                                              # 当前像素Y轴坐标
  251.             for w in range(PIX[1][0]):                        # 开始横向扫描
  252.                 PosX = InitPosX + w        
  253.                 X =        PosX-randint(-15,15)
  254.                 Y = PosY-randint(-15,15)                        # 当前像素X轴坐标
  255.                 idx  = 4 * (h * PIX[1][0] + w)                # 脚标
  256.                 PixR = PIX[2][idx + 0]                        # 当前像素的红色分量
  257.                 PixG = PIX[2][idx + 1]                        # 当前像素的绿色分量
  258.                 PixB = PIX[2][idx + 2]                        # 当前像素的蓝色分量
  259.                 PixA = PIX[2][idx + 3]                        # 当前像素的透明度
  260.                 if PixA != 0:                                # 如果当前像素不为透明则进行如下操作
  261.                     M = mov(PosX,PosY,X,Y)

  262.                     ass_main(ASS_BUF, SubL(_BT+15,_ET+randint(-10,10)),M+bord(0), PixPt())
  263.         ass_main(ASS_BUF, SubL(_BT,_BT+15),fad(150,0)+pos(_X,_Y)+be(1) +blur(2)+bord(2), "On Squall")



  264.     return (ASS_BUF, TCAS_BUF)         
复制代码
I have a low level, to understand


1.png

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-14 16:07:49 |显示全部楼层
Mirael 发表于 2012-3-13 05:58
A few bugs are fixed. ^_^'
On it sat a little, but still something is not right.
I can not say I wa ...

Now, I think I have some spare time, so, for my convenience, can you upload the complete project (containing all the required files)?

Rank: 5Rank: 5

发表于 2012-3-14 16:43:36 |显示全部楼层
milkyjing 发表于 2012-3-14 16:07
Now, I think I have some spare time, so, for my convenience, can you upload the com ...

miky大大,英语怎么才可以那么强大····咱读了那么多年书,英语还是渣渣...

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-14 16:48:05 |显示全部楼层
忘却の小伊 发表于 2012-3-14 16:43
miky大大,英语怎么才可以那么强大····咱读了那么多年书,英语还是渣渣... ...

多用用呗, 上上英文网站, 用英文操作系统啥的, 能用英文就不用中文, 这样?... 别被语法词汇啥的给束缚了

Rank: 5Rank: 5

发表于 2012-3-14 17:08:33 |显示全部楼层
milkyjing 发表于 2012-3-14 16:48
多用用呗, 上上英文网站, 用英文操作系统啥的, 能用英文就不用中文, 这样?... 别被语法词 ...

那咱是不是换日语系统,咱日语会变强大...

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-14 17:15:49 |显示全部楼层
忘却の小伊 发表于 2012-3-14 17:08
那咱是不是换日语系统,咱日语会变强大...

或多或少有帮助吧...

Rank: 4

发表于 2012-3-14 22:03:49 |显示全部楼层
Okey. :)
I'm sorry, I read only now ...
[SAI]005_seikonnoqwaserED1.rar (7.33 KB, 下载次数: 2518)

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

发表于 2012-3-15 17:00:30 |显示全部楼层
Mirael 发表于 2012-3-14 22:03
Okey. :)
I'm sorry, I read only now ...

Well, this script was created two years ago. Actually, it's not a script for TCAX = = So I created a revision.
[SAI]005_seikonnoqwaserED1_rev.zip (8.88 MB, 下载次数: 2292)
PS:There are many determine statements in this script and I used TCAS effect in this FX. It's difficult to run the script without original k-timed ass file and images.

Rank: 4

发表于 2012-3-15 19:07:24 |显示全部楼层
Thank You, saiyaku that you want to convert it. :)
Yes indeed, without the rest of the components (eg images) could be tired with this long, long time. xD
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-29 20:06

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH