TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[youkaze]002_Rotation
[打印本页]
作者:
四月一日 君寻
时间:
2012-2-23 22:07:58
标题:
[youkaze]002_Rotation
本帖最后由 七海の游风 于 2012-2-24 10:29 编辑
from tcaxPy import *
from pixLibs.ImageStone.pixStone import *
def tcaxPy_Init():
global _FontFileName
global _FaceID
global _Fs
global _TextWidth
global _TextHeight
global _TextLength
global _TextAdvDiff
global _ResolutionX
global _OffsetX
global _FD
global Font
global FontOut
_FontFileName = GetVal(val_FontFileName)
_FaceID = GetVal(val_FaceID)
_Fs = GetVal(val_FontSize)
_TextHeight = GetVal(val_TextHeight)
_TextWidth = GetVal(val_TextWidth)
_TextLength = GetVal(val_TextLength)
_TextAdvDiff = GetVal(val_TextAdvanceDiff)
_ResolutionX = GetVal(val_ResolutionX)
_OffsetX = GetVal(val_OffsetX)
_FD = 1000 / GetVal(val_FXFPS)
Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
FontOut = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 4, 1)
def tcaxPy_Fin():
FinFont(Font)
FinFont(FontOut)
def fsc(x):
X = randint(0,x)
return fscx(X)+fscy(X)
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
ASS_BUF = []
COLOR=[ "3F95FF", "3FD8FF","3FFF4E","FFDF3F","FF3F4F","C13FFF","7370FF" ]
if _i < 1:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
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)
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)
if _i > 0 and _i < 4:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
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)
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)
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
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 ')
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
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 ')
if _i > 3 and _i < 10:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_ET),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
for i in range(_BT+_SK-5,_ET,8):
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)
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)
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)
for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
R = RandCir2(_X, _Y, 30, 50)
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), '★')
if _i > 9 and _i < 13:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
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)
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)
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
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 ')
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
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 ')
if _i > 12 and _i < 17:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_ET),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
for i in range(_BT+_SK-5,_ET,8):
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)
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)
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)
for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
R = RandCir2(_X, _Y, 30, 50)
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), '★')
if _i > 16 and _i < 21:
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)
ass_main(ASS_BUF, SubL(_BT+(_j+1)*5,_BT+_SK),an(5)+pos(_X, _Y)+blur(1)+bord(2)+shad(0), _TXT)
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)
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)
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X+5,_Y-10,_X+25,_Y-40)+bord(0.5)+blur(2)+shad(0)
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 ')
EFT = alpha1(0) + color1('7200D3')+ color3('FFFFFF')+mov(_X-15,_Y-40,_X+5,_Y-10)+bord(0.5)+blur(2)+shad(0)
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 ')
for i in range(_BT+_SK-5,_BT+_SK+_KT,8):
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)
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)
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)
for j in range(_BT+_SK-5,_BT+_SK+_KT,8):
R = RandCir2(_X, _Y, 30, 50)
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), '★')
return (ASS_BUF, None)
复制代码
115下载预览:
http://115.com/file/an97vzb3
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2