- UID
- 3
- 积分
- 8169
- 帖子
- 259
- 主题
- 68
- 论坛币
- 5016
- 威望
- 54
- EP值
- 2533
- MP值
- 20
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 1097 小时
- 最后登录
- 2022-10-8
|
預覽:http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview
這個 分了4個腳本 這是左邊日文。。。- from tcaxPy import *
- def tcaxPy_Init():
- # Tips: initialize your global variables here
- global _FontSize
- global pyFont
- _FontSize = GetVal(val_FontSize)
- pyFont = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), GetVal(val_FontSize), GetVal(val_Spacing), GetVal(val_SpaceScale), 0x0000FF, 0, 0)
- def tcaxPy_Main(_I, _J, _N, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # used for saving raw TCS FX data
- ass_main(ASS_BUF, SubL(_BT+(_J-1)*5,_BT+_J*5,3),pos(_X,_Y)+bord(0)+blur(3)+color1('FFFFFF')+color3('FFFFFF'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+(_J-1)*5,_BT+_J*5,3),pos(_X,_Y)+bord(0)+blur(3)+color1('FFFFFF')+color3('FFFFFF'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+(_J-1)*5,_BT+_J*5,3),pos(_X,_Y)+bord(0)+blur(3)+color1('FFFFFF')+color3('FFFFFF'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_J*5,_BT+_SK,1),pos(_X,_Y)+bord(1)+shad(2)+color1('FFC0A9')+color3('700002'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+15,2),pos(_X,_Y)+bord(2)+blur(6)+color1('FFFFFF')+color3('700002'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+15,2),pos(_X,_Y)+bord(0)+blur(3)+color1('FFFFFF')+color3('FFFFFF'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+15,2),pos(_X,_Y)+bord(0)+blur(3)+color1('FFFFFF')+color3('FFFFFF'), _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+15,2),pos(_X,_Y)+bord(2)+blur(6)+alpha1(255)+color3('700002'), _TXT)
- PIX = TextPix(pyFont, _TXT)
- InitPosX = _X - int(_A / 2 + 0.5) + PIX[0][0] # left most position of the pixels in PIX
- InitPosY = _Y - int(_FontSize / 2 + 0.5) + PIX[0][1] # upper most position of the pixels in PIX
- X_list = []
- Y_list = []
- for h in range(PIX[1][1]):
- PosY = InitPosY + h # y-position of the current pixel
- for w in range(PIX[1][0]):
- PosX = InitPosX + w # x-position of the current pixel
- X = PosX
- Y = PosY
-
- 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:
- Y_list.append(PosY)
- X_list.append(PosX)
- B = Y_list[randint(0,len(Y_list)-1)]
- A = X_list[randint(0,len(Y_list)-1)]
-
- distance = []
- for h in range(PIX[1][1]):
- PosY = InitPosY + h # y-position of the current pixel
- for w in range(PIX[1][0]):
- PosX = InitPosX + w # x-position of the current pixel
- X = PosX
- Y = PosY
- 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:
- import math
- d = int(math.sqrt((X-A)**2+(Y-B)**2))
- distance.append(d)
- dmax = max(distance)
- Color = DivClr('FFFFFF','EC9F00',int(dmax))
-
- for h in range(PIX[1][1]):
- PosY = InitPosY + h # y-position of the current pixel
- for w in range(PIX[1][0]):
- PosX = InitPosX + w # x-position of the current pixel
- X = PosX
- Y = PosY
- 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: # skip transparent pixels
- import math
- d = int(math.sqrt((X-A)**2+(Y-B)**2))-1
- ass_main(ASS_BUF, SubL(_BT+_SK+15,_ET+_J*5),pos(X,Y)+bord(0)+alpha1(255-PixA)+color1(Color[d]), PixPt())
- ass_main(ASS_BUF, SubL(_BT+_SK+15,_ET+_J*5),pos(X,Y)+bord(0)+alpha1(255-PixA)+color1(Color[d]), PixPt())
- ass_main(ASS_BUF, SubL(_BT+_SK+15,_ET+_J*5,1),pos(_X,_Y)+bord(2)+blur(6)+alpha1(255)+color3('700002'), _TXT)
- ass_main(ASS_BUF, SubL(_ET+(_J-1)*5,_ET+_J*5+40,1),pos(_X-randint(5,15),_Y-randint(5,15))+an(7)+bord(3)+alpha1(255)+color3('700002')+fscx(11)+fscy(11)+t1(0,400,bord(2)+fscx(330)+fscy(330)+fad(0,200)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
- ass_main(ASS_BUF, SubL(_ET+(_J-1)*5+randint(0,5),_ET+_J*5+40,1),pos(_X+randint(-15,15),_Y+randint(-15,15))+an(7)+bord(3)+alpha1(255)+color3('700002')+fscx(11)+fscy(11)+t1(0,400,bord(2)+fscx(330)+fscy(330)+fad(0,300)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
- ass_main(ASS_BUF, SubL(_ET+(_J-1)*5+randint(3,5),_ET+_J*5+40,1),pos(_X+randint(5,15),_Y+randint(5,15))+an(7)+bord(3)+alpha1(255)+color3('700002')+fscx(11)+fscy(11)+t1(0,400,bord(2)+fscx(330)+fscy(330)+fad(0,200)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
- return (ASS_BUF,None)
- def tcaxPy_Fin():
- # Tips: finalize your global variables here
- FinFont(pyFont)
复制代码 |
-
1
查看全部评分
-
|