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

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

[完整特效] [youkaze]007_AnotherED [复制链接]

Moderator

youkaze

Rank: 5Rank: 5

跳转到指定楼层
楼主
发表于 2012-2-23 22:13:43 |只看该作者 |正序浏览
本帖最后由 七海の游风 于 2012-2-24 11:00 编辑
  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.    

  20. def tcaxPy_Fin():


  21.     FinFont(_Font)

  22. def fsc(x):

  23.     X = randint(0,x)

  24.     return fscx(X)+fscy(X)


  25. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT,):
  26.     ASS_BUF = []


  27.     COLOR=[ "0096FF", "2F3649","3A2220","41BAFF","0E54A3","268CBB","151588" ]
  28.     COLOR1=color1(COLOR[randint(0,6)])

  29.     dx = _X - int(_A  / 2 + 0.5)
  30.     dy = _Y - int(_Fs / 2 + 0.5)
  31.     mask = TextOutlineDraw(_Font, _TXT, dx, dy)


  32.     ass_main(ASS_BUF, SubL(_BT-20-8+_j*5,_BT+(_j+1)*5),pos(_X-2,_Y+1)+bord(0)+fad(200,0)+alpha1(50)+color1('000000')+blur(3), _TXT)
  33.     ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),pos(_X-2,_Y+1)+bord(0)+alpha1(50)+color1('000000')+blur(3), _TXT)
  34.     ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),pos(_X-2,_Y+1)+bord(0)+alpha1(50)+color1('000000')+blur(3), _TXT)
  35.     ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET+20-8+_j*5),pos(_X-2,_Y+1)+bord(0)+fad(0,200)+alpha1(50)+color1('000000')+blur(3), _TXT)



  36.     if _i > -1 and _i < 4:
  37.         R = RandCir2(_X, _Y, 10, 11)
  38.         
  39.         ass_main(ASS_BUF, SubL(_BT-20-8+_j*5,_ET-8+_j*5),an(5) + pos(_X, _Y)+color('FFFFFF')+ bord(0)+fad(200,200)+blur(0)+ alpha1(0)+fs(100)+ clip2(7, mask), "●")

  40.         ass_main(ASS_BUF, SubL(_BT+_SK-20, _BT+_SK+_KT),an(5) + pos(R[0],R[1])+COLOR1+ bord(0)+blur(7)+ alpha1(100)+fs(1)+t(fs(45))+clip2(7, mask), "●")
  41.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT, _ET),an(5) + pos(R[0],R[1])+COLOR1+ bord(0)+blur(7)+ alpha1(100)+fs(45)+clip2(7, mask), "●")
  42.         ass_main(ASS_BUF, SubL(_ET, _ET+20-8+_j*5),an(5) + pos(R[0],R[1])+COLOR1+ bord(0)+blur(7)+ alpha1(100)+fs(45)+t(fs(1))+clip2(7, mask), "●")

  43.         for i in range(_BT+_SK-20,_BT+_SK+_KT,30):
  44.             for k in range(3):
  45.                 ass_main(ASS_BUF, SubL(i, i+150,50), an(7)+fsc(190+randint(-20,20))+bord(0)+blur(2)+COLOR1+fad(30,300)+mov(R[0]+randint(-10,10),R[1]+randint(-10,10),_X-60-randint(30,60),_Y+20+randint(50,70))+frz(0)+t(frz(randint(-360,360))), "{\p3}m 3 9 b -2 1 -7 -7 2 -12 b 14 1 0 4 3 9 {\p0}")




  46.     if _i > 3:
  47.         R = RandCir2(_X, _Y, 10, 11)
  48.         
  49.         ass_main(ASS_BUF, SubL(_BT-20-8+_j*5,_ET-8+_j*5),an(5) + pos(_X, _Y)+color('FFFFFF')+ bord(0)+fad(200,200)+blur(0)+ alpha1(0)+fs(100)+ clip2(7, mask), "●")

  50.         ass_main(ASS_BUF, SubL(_BT+_SK-20, _BT+_SK+_KT),an(5) + pos(R[0],R[1])+color1('0900B8')+ bord(0)+blur(7)+ alpha1(120)+fs(1)+t(fs(45))+clip2(7, mask), "●")
  51.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT, _ET),an(5) + pos(R[0],R[1])+color1('0900B8')+ bord(0)+blur(7)+ alpha1(120)+fs(45)+clip2(7, mask), "●")
  52.         ass_main(ASS_BUF, SubL(_ET, _ET+20-8+_j*5),an(5) + pos(R[0],R[1])+color1('0900B8')+ bord(0)+blur(7)+ alpha1(120)+fs(45)+t(fs(1))+clip2(7, mask), "●")

  53.         for i in range(_BT+_SK-20,_BT+_SK+_KT,30):
  54.             for k in range(3):
  55.                 ass_main(ASS_BUF, SubL(i, i+150,50), an(7)+fsc(190+randint(-20,20))+bord(0)+blur(2)+color1('0900B8')+fad(30,300)+mov(R[0]+randint(-10,10),R[1]+randint(-10,10),_X-60-randint(30,60),_Y+20+randint(50,70))+frz(0)+t(frz(randint(-360,360))), "{\p3}m 3 9 b -2 1 -7 -7 2 -12 b 14 1 0 4 3 9 {\p0}")





  56.     return (ASS_BUF, None)
复制代码
115下载预览:http://115.com/file/dpl1xe4l
1

查看全部评分

您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-11-22 06:47

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH