- UID
- 363
- 积分
- 2032
- 帖子
- 123
- 主题
- 18
- 论坛币
- 3812
- 威望
- 10
- EP值
- 1178
- MP值
- 0
- 阅读权限
- 80
- 注册时间
- 2012-3-21
- 在线时间
- 284 小时
- 最后登录
- 2017-1-31
|
本帖最后由 jijidata 于 2012-6-7 15:51 编辑
问题现象:在使用[youkaze]012_Hyouka_ED py中的的第二个特效时发生错误
补充:在使用tcax_1.0.0_sp1 的tcaxLib.pyd替换tcax_1.1.9_sp1的tcaxLib.pyd后,程序工作正常
引起出错部分的脚本代码- if _i > 1 and _i < 7:
-
- dx = _x - int(_a / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- outline = TextOutlinePoints(Font, _txt, 1.0)
-
- num = len(outline)
- dur = 100
- for i in range(num):
- CIR=RandCir2(_x, _y, 30, 34)
- ts = _BT + dur * i / num
- te = _ET
- x = dx + outline[i][0]
- y = dy + outline[i][1]
- B = randint(-100,100)
-
- ass_main(ASS_BUF, SubL(ts-20, _BT+_SK, 1, Pix_Style), an(7)+pos(x, y) + alpha1(0) + alpha3(150) + bord(1.5) + shad(0) + color3('EC487C') + color1('EC487C') + fad(200, 0) + blur(1.5), PixPt())
- ass_main(ASS_BUF, SubL(_BT+_SK, _BT+_SK+_KT+20, 1, Pix_Style), an(7)+mov(x, y, CIR[0], CIR[1]) + alpha1(0) + alpha3(150) + bord(1.5) + shad(0) + color3('EC487C') + color1('ED00BA') + fad(0, 300) + blur(1.5), PixPt())
-
- #points = gfGetPoints(GdiFont, _txt) #GDIfont
- #PIX = PixFromPoints(points) #GDIfont
-
- PIX = TextPix(Font, _txt)
- 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)
- H = randint(-10,10)
- ass_main(ASS_BUF, SubL(int(_BT+_SK+w*(_KT/PIX[1][0]))+H,int(_BT+_SK+150+rnd+w*(_KT/PIX[1][0])),1, Pix_Style),an(7)+mov(PosX,PosY,PosX-20+rnd,PosY)+fad(0,300+R+rnd)+alpha(255-PixA)+shad(0)+bord(1)+blur(1)+org(_x,_y)+color1("FFFFFF")+frx(0)+t(500,0,frx(360)+color3('FFA739')), "{\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,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())
复制代码 tcc:- # tcc file version
- < tcc file version = 1.000 >
- # mode configuration
- < inherit ass header = false >
- < k mode = syllable >
- < text layout = horizontal >
- < tcaxpy init = true >
- < tcaxpy user = ture >
- < tcaxpy fin = true>
- # py settings
- < py file = D:\SubClub\tcax\scripts\ALL\youkaze-012-.py > < beg line = 1 > < end line = 0 >
- # main settings
- < k-timed ass file = XXX_k.ass >
- < font file = DF顔真卿体W7.ttc > < font face id = 2 > < font size = 30 >
- < fx width = 1920 > < fx height = 1080 > < fx fps = 23.976 >
- < alignment = 2 >
- < x offset = 30 > < y offset = 30 >
- < spacing = 0 > < space scale = 1.000 >
- # style settings
- < font face name = "" >
- < bord = 2 > < shad = 0 >
- < primary color = DA84FB > < secondary color = 00AAFF > < outline color = FFFF00 > < back color = 000000 >
- < primary alpha = 0 > < secondary alpha = 0 > < outline alpha = 0 > < back alpha = 100 >
- # additional settings
- < blur = 1.000 >
复制代码 |
|