TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[youkaze]017_Shinsekai_OP
[打印本页]
作者:
四月一日 君寻
时间:
2012-11-27 12:43:14
标题:
[youkaze]017_Shinsekai_OP
from tcaxPy import *
from gdiFont import *
def tcaxPy_Init():
global _FontFileName
global _FaceID
global _Fs
global _TextWidth
global _TextHeight
global _TextLength
global _TextAdvDiff
global _ResolutionX
global _FD
global GdiFont #GDIfont
_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)
_FD = 1000 / GetVal(val_FXFPS)
GdiFont = gfInitFont(GetVal(val_FontFaceName), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0, False) #GDIfont
def tcaxPy_Fin():
gfFinFont(GdiFont) #GDIfont
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
ASS_BUF = []
# ts = _BT + _SK # start time, in semi-second
# te = _BT + _SK + _KT # end time, in semi-second
# SUIJ0 = randint(-20,20)
# CIR = Circle(12, _x+SUIJ0, _y+SUIJ0, 20)
# for h in range(12):
# SUIJ1 = randint(0,20)
# SUIJ2 = randint(-60,60)
# R1 = RandCir2(_x+SUIJ0, _y+SUIJ0, 18, 18)
# MOV = mov(_x+SUIJ0,_y+SUIJ0,R1[0],R1[1])
# MOV = mov(_x+SUIJ0,_y+SUIJ0,CIR[h][0], CIR[h][1])
# EFT = MOV+fad(50,0)+bord(0)
# ass_main(ASS_BUF,SubL(ts,ts+50+SUIJ1,1), EFT, PixPt())
# CIR2 = Circle(12, CIR[h][0], CIR[h][1], 20)
# for b in range(12):
# R2 = RandCir2(R1[0],R1[1], 22, 22)
# MOV = mov(R1[0],R1[1],R2[0],R2[1])
# MOV = mov(CIR[h][0], CIR[h][1],CIR2[b][0], CIR2[b][1])
# EFT = MOV+fad(0,200)+bord(0)
# ass_main(ASS_BUF,SubL(ts+50+SUIJ1,ts+200+SUIJ2,1), EFT, PixPt())
if _i ==0 or _i ==1 or _i>2 and _i<7 or _i ==8 or _i ==10 or _i ==12 or _i ==14:
for a in range(16):
R = randint(0,15)
dx = _x - int(_a / 2 + 0.5)
dy = _y - int(_Fs / 2 + 0.5)
mask1 = gfGetOutline(GdiFont, _txt, dx+1, dy+1) #GDIfont
ass_main(ASS_BUF, SubL(_BT+_SK+30-a*3,_ET+120-a*6,1),an(7) + pos(_x, _y)+color1("857A81")+fad(200,300)+bord(0)+blur(3)+ alpha1(0)+frz(a*22.5)+clip2(4, mask1)+p(1), "m -1 0 l 1 -23 l 10 -21 l 1 0 ")
mask2 = gfGetOutline(GdiFont, _txt, dx, dy) #GDIfont
ass_main(ASS_BUF, SubL(_BT+_SK+30-a*3,_ET+120-a*6,3),an(7) + pos(_x, _y)+color1("FFFFFF")+fad(200,300)+bord(0)+blur(3)+ alpha1(0)+frz(a*22.5)+clip2(4, mask2)+p(1), "m -1 0 l 1 -23 l 10 -21 l 1 0 ")
if _i ==6 or _i ==8 or _i ==10 or _i ==12 or _i ==14:
ts1 = _BT+_SK
SUIJ0 = randint(-20,20)
CIR = Circle(12, _x+SUIJ0, _y+SUIJ0, 20)
for h in range(12):
SUIJ1 = randint(0,20)
MOV = mov(_x+SUIJ0,_y+SUIJ0,CIR[h][0], CIR[h][1])
EFT = MOV+fad(50,0)+bord(0)
ass_main(ASS_BUF,SubL(ts1,ts1+50+SUIJ1,1), EFT, PixPt())
CIR2 = Circle(12, CIR[h][0], CIR[h][1], 20)
for b in range(12):
SUIJ2 = randint(-60,60)
MOV = mov(CIR[h][0], CIR[h][1],CIR2[b][0], CIR2[b][1])
EFT = MOV+fad(0,200)+bord(0)
ass_main(ASS_BUF,SubL(ts1+50+SUIJ1,ts1+200+SUIJ2,1), EFT, PixPt())
if _i ==2 or _i ==7 or _i ==9 or _i ==11 or _i ==13:
for a in range(16):
R = randint(0,15)
dx = _x - int(_a / 2 + 0.5)
dy = _y - int(_Fs / 2 + 0.5)
mask1 = gfGetOutline(GdiFont, _txt, dx-_ResolutionX+_TextLength[_i]+25+1, dy+1) #GDIfont _ResolutionX
ass_main(ASS_BUF, SubL(_BT+_SK+30-a*3,_ET+120-a*6,1),an(7) + pos(_x-_ResolutionX+_TextLength[_i]+25, _y)+color1("857A81")+fad(200,300)+bord(0)+blur(3)+ alpha1(0)+frz(a*22.5)+clip2(4, mask1)+p(1), "m -1 0 l 1 -23 l 10 -21 l 1 0 ")
mask2 = gfGetOutline(GdiFont, _txt, dx-_ResolutionX+_TextLength[_i]+25, dy) #GDIfont
ass_main(ASS_BUF, SubL(_BT+_SK+30-a*3,_ET+120-a*6,3),an(7) + pos(_x-_ResolutionX+_TextLength[_i]+25, _y)+color1("FFFFFF")+fad(200,300)+bord(0)+blur(3)+ alpha1(0)+frz(a*22.5)+clip2(4, mask2)+p(1), "m -1 0 l 1 -23 l 10 -21 l 1 0 ")
if _i ==7 or _i ==9 or _i ==11 or _i ==13:
ts2 = _BT+_SK
SUIJ0 = randint(-20,20)
CIR = Circle(12, _x-_ResolutionX+_TextLength[_i]+25+SUIJ0, _y+SUIJ0, 20)
for h in range(12):
SUIJ1 = randint(0,20)
MOV = mov(_x-_ResolutionX+_TextLength[_i]+25+SUIJ0,_y+SUIJ0,CIR[h][0], CIR[h][1])
EFT = MOV+fad(50,0)+bord(0)
ass_main(ASS_BUF,SubL(ts2,ts2+50+SUIJ1,1), EFT, PixPt())
CIR2 = Circle(12, CIR[h][0], CIR[h][1], 20)
for b in range(12):
SUIJ2 = randint(-60,60)
MOV = mov(CIR[h][0], CIR[h][1],CIR2[b][0], CIR2[b][1])
EFT = MOV+fad(0,200)+bord(0)
ass_main(ASS_BUF,SubL(ts2+50+SUIJ1,ts2+200+SUIJ2,1), EFT, PixPt())
return (ASS_BUF, None)
复制代码
老样子一些东西写了没用 没整理 预览群邮了
作者:
milkyjing
时间:
2012-12-1 18:18:54
这个效果感觉很不错啊, 用哔哔姐的话说就是 挺洋气
作者:
智负
时间:
2013-3-3 17:44:02
求群号
作者:
milkyjing
时间:
2013-3-3 19:33:41
智负 发表于 2013-3-3 17:44
求群号
去 版务区看看, 应该有置顶
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2