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

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

[完整特效] [youkaze]002_Rotation [复制链接]

Moderator

youkaze

Rank: 5Rank: 5

跳转到指定楼层
楼主
发表于 2012-2-23 22:07:58 |只看该作者 |正序浏览
本帖最后由 七海の游风 于 2012-2-24 10:29 编辑
  1. from tcaxPy import *
  2.    


  3. from pixLibs.ImageStone.pixStone import *




  4. def tcaxPy_Init():



  5.     global _FontFileName   
  6.     global _FaceID       
  7.     global _Fs                       
  8.     global _TextWidth               
  9.     global _TextHeight               
  10.     global _TextLength
  11.     global _TextAdvDiff
  12.     global _ResolutionX
  13.     global _OffsetX
  14.     global _FD               
  15.     global Font               
  16.     global FontOut


  17.     _FontFileName = GetVal(val_FontFileName)
  18.     _FaceID       = GetVal(val_FaceID)
  19.     _Fs           = GetVal(val_FontSize)
  20.     _TextHeight   = GetVal(val_TextHeight)
  21.     _TextWidth    = GetVal(val_TextWidth)
  22.     _TextLength   = GetVal(val_TextLength)
  23.     _TextAdvDiff  = GetVal(val_TextAdvanceDiff)
  24.     _ResolutionX  = GetVal(val_ResolutionX)
  25.     _OffsetX      = GetVal(val_OffsetX)
  26.     _FD           = 1000 / GetVal(val_FXFPS)



  27.     Font    = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)   
  28.     FontOut = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 4, 1)



  29. def tcaxPy_Fin():



  30.     FinFont(Font)
  31.     FinFont(FontOut)

  32. def fsc(x):

  33.     X = randint(0,x)

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


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

  37.     COLOR=[ "3F95FF", "3FD8FF","3FFF4E","FFDF3F","FF3F4F","C13FFF","7370FF" ]




  38.     if _i < 1:
  39.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)

  40.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)

  41.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0)+fscx(100)+fscy(100)+t(fscx(200)+fscy(200)), _TXT)

  42.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_ET-8+_j*5),an(5)+pos(_X, _Y)+fad(0,500)+blur(1)+bord(2)+shad(0)+fscx(200)+fscy(200)+t(fscx(50)+fscy(50)), _TXT)
  43.         


  44.     if _i > 0 and _i < 4:
  45.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)        
  46.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)

  47.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0)+fscx(100)+fscy(100)+t(0, 3 * _KT,fscx(120)+fscy(70))+t1(3 * _KT, 6 * _KT,fscx(70)+fscy(120))+t1(6 * _KT, 9 * _KT,fscx(100)+fscy(100)), _TXT)
  48.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_BT+_SK+_KT+20-8+_j*5),an(5)+move(_X, _Y ,_X-60, _Y)+fad(0,300)+blur(1)+bord(2)+shad(0)+frz(0)+t(frz(90)), _TXT)

  49.         
  50.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
  51.         ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+_KT-10),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')
  52.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
  53.         ass_main(ASS_BUF, SubL(_BT+_SK-10, _BT+_SK),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')
  54.         



  55.     if _i > 3 and _i < 10:

  56.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)        
  57.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
  58.         ass_main(ASS_BUF, SubL(_BT+_SK,_ET),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
  59.         

  60.         for i in range(_BT+_SK-5,_ET,8):
  61.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(6)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  62.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  63.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  64.             
  65.             for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
  66.                 R = RandCir2(_X, _Y, 30, 50)
  67.                 ass_main(ASS_BUF, SubL( i+ randint(0,10), i + 50+ randint(-10,10),1),mov(R[0],R[1],_X,_Y)+fn('Arial')+ fs(8)+fad(40,200)+bord(0)+blur(0.5)+color1(COLOR[randint(0,6)])+alpha(0)+shad(0), '★')




  68.     if _i > 9 and _i < 13:
  69.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)        
  70.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)

  71.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0)+fscx(100)+fscy(100)+t(0, 3 * _KT,fscx(120)+fscy(70))+t1(3 * _KT, 6 * _KT,fscx(70)+fscy(120))+t1(6 * _KT, 9 * _KT,fscx(100)+fscy(100)), _TXT)
  72.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_BT+_SK+_KT+20-8+_j*5),an(5)+move(_X, _Y ,_X-60, _Y)+fad(0,300)+blur(1)+bord(2)+shad(0)+frz(0)+t(frz(90)), _TXT)

  73.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
  74.         ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+_KT-10),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')
  75.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
  76.         ass_main(ASS_BUF, SubL(_BT+_SK-10, _BT+_SK),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')



  77.     if _i > 12 and _i < 17:

  78.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)        
  79.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
  80.         ass_main(ASS_BUF, SubL(_BT+_SK,_ET),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
  81.         

  82.         for i in range(_BT+_SK-5,_ET,8):
  83.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(6)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  84.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  85.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  86.             
  87.             for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
  88.                 R = RandCir2(_X, _Y, 30, 50)
  89.                 ass_main(ASS_BUF, SubL( i+ randint(0,10), i + 50+ randint(-10,10),1),mov(R[0],R[1],_X,_Y)+fn('Arial')+ fs(8)+fad(40,200)+bord(0)+blur(0.5)+color1(COLOR[randint(0,6)])+alpha(0)+shad(0), '★')


  90.     if _i > 16 and _i < 21:
  91.         
  92.         ass_main(ASS_BUF, SubL(_BT-8+_j*5-20,_BT+(_j+1)*5),an(5)+move(_X+60, _Y ,_X , _Y)+fad(500,0)+blur(1)+bord(2)+shad(0)+frz(270)+t(frz(360)), _TXT)        
  93.         ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)

  94.         ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0)+fscx(100)+fscy(100)+t(0, 3 * _KT,fscx(120)+fscy(70))+t1(3 * _KT, 6 * _KT,fscx(70)+fscy(120))+t1(6 * _KT, 9 * _KT,fscx(100)+fscy(100)), _TXT)
  95.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-8+_j*5),an(5)+pos(_X, _Y)+fad(0,300)+blur(1)+bord(2)+shad(0), _TXT)

  96.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
  97.         ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+_KT-10),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')
  98.         EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
  99.         ass_main(ASS_BUF, SubL(_BT+_SK-10, _BT+_SK),an(5)+ EFT, '{\\p3}m 3 -50 b 46 -64 66 -21 53 4 b 43 24 11 37 -16 10 b -18 13 -25 10 -20 6 b -24 2 -24 -1 -18 -3 b -18 -4 -19 -6 -17 -7 b -17 -7 -19 -7 -19 -8 b -23 -6 -25 -11 -20 -12 b -21 -15 -18 -19 -15 -19 b -14 -27 -23 -34 -20 -42 b -19 -46 -14 -51 -9 -50 b -6 -50 -3 -46 -4 -41 b -1 -43 4 -45 7 -42 b 10 -39 9 -33 7 -29 b 4 -21 -7 -24 -13 -19 b -7 -18 -8 -12 -10 -9 b -7 -7 -6 -4 -7 -1 b -4 -1 -3 1 -4 3 b -5 6 -9 5 -10 3 b -10 4 -11 5 -12 5 b -12 6 -13 7 -13 7 b 17 16 27 -2 30 -8 b 38 -34 26 -52 3 -50 ')

  100.         for i in range(_BT+_SK-5,_BT+_SK+_KT,8):
  101.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(6)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  102.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)
  103.             ass_main(ASS_BUF, SubL(i,i+4,30),pos(_X,_Y)+bord(3)+blur(3)+color3('FFFFFF')+color1('FFFFFF')+alpha(155)+shad(0), _TXT)

  104.             for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
  105.                 R = RandCir2(_X, _Y, 30, 50)
  106.                 ass_main(ASS_BUF, SubL( i+ randint(0,10), i + 50+ randint(-10,10),1),mov(R[0],R[1],_X,_Y)+fn('Arial')+ fs(8)+fad(40,200)+bord(0)+blur(0.5)+color1(COLOR[randint(0,6)])+alpha(0)+shad(0), '★')



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

查看全部评分

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

GitHub|TCAX 主页

GMT+8, 2024-11-22 11:14

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH