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

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

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

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 ...

Rank: 4

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

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

Rank: 4

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

Rank: 4

5#
发表于 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-5-3 01:46

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH