- UID
- 702
- 积分
- 1002
- 帖子
- 241
- 主题
- 12
- 论坛币
- 2292
- 威望
- 2
- EP值
- 520
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2012-9-9
- 在线时间
- 281 小时
- 最后登录
- 2014-4-1
|
呜咕。。修改youkeze大大的特效吧。。啊呜。。果然还是高兴不起来的说 o(︶︿︶)o 唉- from tcaxPy import *
- from gdiFont import * #加入GDIfont模块
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _TextWidth
- global _TextHeight
- global _TextLength
- global _TextAdvDiff
- global _ResolutionX
- global _OffsetX
- global _FD
- _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)
- global GdiFont #GDIfont
-
- GdiFont = gfInitFont(GetVal(val_FontFaceName), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0, False) #GDIfont
-
- global Font
- Font = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def tcaxPy_Fin():
- gfFinFont(GdiFont) #GDIfont
-
- FinFont(Font)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
- ASS_BUF = []
- points = gfGetPoints(GdiFont, _txt) #GDIfont
- PIX = PixFromPoints(points) #GDIfont
- InitPosX = _x - int(_a / 2 + 0.5) + PIX[0][0] # 第一个像素的X轴坐标
- InitPosY = _y - int(_Fs / 2 + 0.5) + PIX[0][1] # 第一个像素的Y轴坐标
- for h in range(PIX[1][1]): # 开始纵向扫描
- PosY = InitPosY + h
- # 当前像素Y轴坐标
- for w in range(PIX[1][0]): # 开始横向扫描
- PosX = InitPosX + w
- X = PosX-randint(-50,50)
- Y = PosY-randint(-50,50) # 当前像素X轴坐标
- idx = 4 * (h * PIX[1][0] + w) # 脚标
- PixR = PIX[2][idx + 0] # 当前像素的红色分量
- PixG = PIX[2][idx + 1] # 当前像素的绿色分量
- PixB = PIX[2][idx + 2] # 当前像素的蓝色分量
- PixA = PIX[2][idx + 3] # 当前像素的透明度
- if PixA != 0: # 如果当前像素不为透明则进行如下操作
- rnd = randint(-30,30)
- R = randint(-100,100)
- C = randint(-100,100)
- H = randint(-10,10)
-
- S = randint(0,20)
-
- ass_main(ASS_BUF, SubL(int(_BT+_SK+h*(_KT/PIX[1][1]))+H,int(_BT+_SK+_KT+rnd+h*(_KT/PIX[1][1])),1, Pix_Style),an(7)+mov(PosX,PosY,PosX,PosY-50+rnd)+fad(0,300+R+rnd)+alpha(255-PixA)+shad(0)+bord(1)+blur(1)+org(_x,_y)+color1("FFFFFF")+fry(0)+t(20,300,fry(57)+color3('FFFFFF')), "{\p5}m -5 -15 l -15 0 l -6 7 l 9 12 l 5 4 l 13 -13 ")
-
- ass_main(ASS_BUF, SubL(_BT-35+_j*3,int(_BT+_SK+w*(_KT/PIX[1][0]))+H,1, Pix_Style),an(7)+pos(PosX,PosY)+shad(0)+bord(0)+alpha(255-PixA)+color1("FFFFFF")+fad(200,0), PixPt())
- EFT1 = alpha1(0) + alpha3(0) + color1('FFFFFF') + bord(2.3) + blur(1.5) + t(0, 100, fscx(5)+fscy(5)) + fad(0, 200)
- num = 100
- xs = _x - 40 # 开始点
- ys = _y + 10
- xc1 = _x - 3 # 控制点
- yc1 = _y - 30
- xe = _x - 3 # 结束点
- ye = _y
- num = 100
- ixs = _x + 40 # 开始点
- iys = _y + 10
- xc2 = _x + 3 # 控制点1
- yc2 = _y + 30
- kxe = _x + 3 # 结束点
- kye = _y
- points1 = Bezier2(num, xs, ys, xe, ye, xc1, yc1) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
- points2 = Bezier2(num, ixs, iys, kxe, kye, xc2, yc2)
- for i in range(num):
- POS1 = pos(points1[i][0], points1[i][1])
- POS2 = pos(points2[i][0], points1[i][1])
- EFT1 = POS1 + EFT1 + color3('H1D43FF&') + an(7)
- ass_main(ASS_BUF, SubL(_BT+_SK-115+i*1, _BT+_SK-115+(i+1)*1+20, 1, Pix_Style), EFT1, "{\p2}m 7 0 b 2 0 1 4 1 6 b 1 8 2 12 7 12 b 12 12 13 8 13 6 b 13 4 12 0 7 0 ")
- EFT1 = POS2 + EFT1+ color3('H1D43FF&') + an(7)
- ass_main(ASS_BUF, SubL(_BT+_SK-115+i*1, _BT+_SK-115+(i+1)*1+20, 1, Pix_Style), EFT1, "{\p2}m 7 0 b 2 0 1 4 1 6 b 1 8 2 12 7 12 b 12 12 13 8 13 6 b 13 4 12 0 7 0 ")
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),an(5)+pos(_x,_y)+bord(1.5)+blur(1.5)+alpha1(255)+color3('EC487C')+t(0,100,color3('FFFFFF')+blur(4)+bord(4))+t(300,600,bord(1.5)+blur(1.5)), _txt)
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- outline = TextOutlinePoints(Font, _txt, 1.0)
- num = len(outline)
- for i in range(num):
- CIR=RandCir2(_x, _y, 48, 53)
- x = dx + outline[i][0]
- y = dy + outline[i][1]
-
-
- ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+39, 1, Pix_Style), an(7)+mov(x, y, CIR[0], CIR[1]) + alpha1(100) + alpha3(135) + bord(3) + shad(0) + color3('HE9F5FF&') + color1('HE9F5FF&') + fad(0, 300) + blur(2)+frx(56)+org(_x,_y), PixPt())
-
-
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- outline = TextOutlinePoints(Font, _txt, 1.0)
- num = len(outline)
- for i in range(num):
- CIR=RandCir(_x, _y, 24)
- x = dx + outline[i][0]
- y = dy + outline[i][1]
-
-
- ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+39, 1, Pix_Style), an(7)+mov(x, y, CIR[0], CIR[1]) + alpha1(0) + alpha3(135) + bord(3) + shad(0) + color3('H35A7FF&') + color1('H1399FF&') + fad(0, 300) + blur(2), PixPt())
- return (ASS_BUF, None)
复制代码
呜咕。。让TCAX随机分配的K值。。换了视频的分辨率。。忘了了调整黑框的位置了(T.T)。。可是这个K值。。应该不是脚本的问题吧0.0 |
-
1
查看全部评分
-
|