TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

标题: TCC报错! [打印本页]

作者: yy100313    时间: 2014-7-19 12:25:55     标题: TCC报错!

ff.png


============================================================================
TCC
# tcc file version

< tcc file version = 1.000 >

# mode configuration

< inherit ass header = false >
< k mode = syl >
< text layout = horizontal >
< tcaxpy init =false >
< tcaxpy user =false >
< tcaxpy fin = false >

# py settings
< py file =saiyaku1.py >    < beg line = 1 >    < end line = 0 >





< k-timed ass file = SAO_ED_01.ass >
< font file = axisstd-bold.otf >    < font face id = 1 >    < font size = 36 >
< fx width = 1280 >    < fx height = 720 >    < fx fps = 23.976 >
< alignment = 2 >
< x offset = 10 >    < y offset = 20 >
< spacing = 0 >    < space scale = 1.000 >



# style settings

< font face name = "" >
< bord = 2 >    < shad = 0 >
< primary color = FFFFFF >    < secondary color = 000000 >    < outline color = FFC900 >    < back color = 000000 >
< primary alpha = 0 >    < secondary alpha = 0 >    < outline alpha = 0 >    < back alpha = 0 >

# additional settings

< blur = 1.000 >

图片附件: ff.png (2014-7-19 12:24:26, 34.27 KB) / 下载次数 1717
http://tcax.org/forum.php?mod=attachment&aid=MTc1NHw0ZWI0NjhiMnwxNzMyMjI5NDU1fDB8MA%3D%3D


作者: yy100313    时间: 2014-7-19 12:29:19

Py
用的是saiyaku大神的(该不会怪我吧
from tcaxPy import *
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _7X, _7Y, _X, _Y, _A, _W, _H, _TXT, _J, _N):

    ASS_BUF = []                # 用于保存ASS特效

    if _i ==7:
        for x in range (100):        
             ass_main(ASS_BUF, SubL(_BT,_BT+(224/4)*3),fscx(50)+fscy(50)+fad(0,_KT/2)+be(1)+blur(7)+color1("#000000")+mov(640,30,640+randint(-45,45),30+randint(-45,45)),"{\p4}m 50 0 b 100 0 100 100 50 100 b 0 100 0 0 50 0{\p0}")
        X = _X + randint(30,60)
        for i in range(50):
        
            ass_main(ASS_BUF, SubL(_BT-i,_BT),be(1)+color1("#000000")+fad(180,0)+alpha(180)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)
        ass_main(ASS_BUF, SubL(_BT-50,_BT),be(1)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)

        EFT1 = an(5)+fscx(100)+fscy(100)+t1(0,(224/4)*10,fscx(150)+fscy(150))+t1((224/4)*30+1,224*10,fscx(100)+fscy(100))  
        
        ass_main(ASS_BUF, SubL(_BT,_BT+223),pos(640,30)+EFT1, "woWoWowo")
        
        for y in range(AdvInt(50/10)):
            BEAT = t1(0,100,mov(640,30,640+randint(-4,4),30+randint(-4,4)))+t1(100,200,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(200,300,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(300,400,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(400,500,mov(640+randint(-4,4),30+randint(-4,4),640,30))
            BegTime = _BT+223 + y * 10
            EndTime = _BT+223 + (y+1) * 10
            ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT, "woWoWowo")
        ass_main(ASS_BUF, SubL(_BT+223+50, _BT+223+87),pos(640,30), "woWoWowo")

        for z in range(AdvInt(50/10)):
            BEAT = t1(0,100,mov(640,30,640+randint(-4,4),30+randint(-4,4)))+t1(100,200,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(200,300,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(300,400,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(400,500,mov(640+randint(-4,4),30+randint(-4,4),640,30))
            BT = _BT+223+87+ z * 10
            ET = _BT+223+87 + (z+1) * 10
            ass_main(ASS_BUF, SubL(BT, ET),BEAT, "woWoWowo")
        ass_main(ASS_BUF, SubL(_BT+223+87+50, _BT+223+87+50+35),pos(640,30), "woWoWowo")

        for j in range (15):
            EFT2=fad(0,200)+be(1)+mov(_X,_Y,_X+100,_Y)
            EFT3=fad(0,200)+be(1)+mov(_X,_Y,_X-100,_Y)
            ass_main(ASS_BUF, SubL(_BT+223+87+85+j*2,_BT+223+87+85+30),bord(0)+blur(2)+alpha(180)+color1("#000000")+EFT2, Text = _TXT)
            ass_main(ASS_BUF, SubL(_BT+223+87+85+j*2,_BT+223+87+85+30),bord(0)+blur(2)+alpha(180)+color1("#000000")+EFT3, Text = _TXT)

    elif _i == 11:
        for x in range (100):        
             ass_main(ASS_BUF, SubL(_BT,_BT+(194/4)*3),fscx(50)+fscy(50)+fad(0,_KT/2)+be(1)+blur(7)+color1("#000000")+mov(640,30,640+randint(-45,45),30+randint(-45,45)),"{\p4}m 50 0 b 100 0 100 100 50 100 b 0 100 0 0 50 0{\p0}")
        X = _X + randint(30,60)
        for i in range(50):
        
            ass_main(ASS_BUF, SubL(_BT-i,_BT),be(1)+color1("#000000")+fad(180,0)+alpha(180)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)
        ass_main(ASS_BUF, SubL(_BT-50,_BT),be(1)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)

        EFT1 = an(5)+fscx(100)+fscy(100)+t1(0,(194/4)*10,fscx(150)+fscy(150))+t1((194/4)*30+1,194*10,fscx(100)+fscy(100))  
        
        ass_main(ASS_BUF, SubL(_BT,_BT+194),pos(640,30)+EFT1, "woWoWowo")
        
        for y in range(AdvInt(50/10)):
            BEAT = t1(0,100,mov(640,30,640+randint(-4,4),30+randint(-4,4)))+t1(100,200,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(200,300,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(300,400,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(400,500,mov(640+randint(-4,4),30+randint(-4,4),640,30))
            BegTime = _BT+194 + y * 10
            EndTime = _BT+194 + (y+1) * 10
            ass_main(ASS_BUF, SubL(BegTime, EndTime),BEAT, "woWoWowo")
        ass_main(ASS_BUF, SubL(_BT+194+50,_BT+194+50+38),pos(640,30), "woWoWowo")

        for z in range(AdvInt(50/10)):
            BEAT = t1(0,100,mov(640,30,640+randint(-4,4),30+randint(-4,4)))+t1(100,200,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(200,300,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(300,400,mov(640+randint(-4,4),30+randint(-4,4),640+randint(-4,4),30+randint(-4,4)))+t1(400,500,mov(640+randint(-4,4),30+randint(-4,4),640,30))
            BT = _BT+194+88+ z * 10
            ET = _BT+194+88 + (z+1) * 10
            ass_main(ASS_BUF, SubL(BT, ET),BEAT, "woWoWowo")
        ass_main(ASS_BUF, SubL(_BT+194+88+50,_BT+194+88+87),pos(640,30), "woWoWowo")      


        for j in range (15):
            EFT2=fad(0,200)+be(1)+mov(_X,_Y,_X+100,_Y)
            EFT3=fad(0,200)+be(1)+mov(_X,_Y,_X-100,_Y)
            ass_main(ASS_BUF, SubL(_BT+194+88+87+j*2,_BT+194+88+87+30),bord(0)+blur(2)+alpha(180)+color1("#000000")+EFT2, Text = _TXT)
            ass_main(ASS_BUF, SubL(_BT+194+88+87+j*2,_BT+194+88+87+30),bord(0)+blur(2)+alpha(180)+color1("#000000")+EFT3, Text = _TXT)        
        
    else:   
        for x in range (100):
            ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+(_KT/4)*3),fscx(50)+fscy(50)+fad(0,_KT/2)+be(1)+blur(7)+color1("#000000")+mov(_X,_Y,_X+randint(-45,45),_Y+randint(-45,45)),"{\p4}m 50 0 b 100 0 100 100 50 100 b 0 100 0 0 50 0{\p0}")
        X = _X+randint(30,60)

        for i in range(50):
        
            ass_main(ASS_BUF, SubL(_BT-i+_j*8,_BT+_j*8),be(1)+color1("#000000")+fad(180,0)+alpha(180)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)
        ass_main(ASS_BUF, SubL(_BT-50+_j*8,_BT+_j*8),be(1)+pos(_X,_Y)+org(X,_Y)+frz(-270+_j*3)+fscx(20)+fscy(20)+t1(0,500,frz(0)+fscx(100)+fscy(100)), _TXT)   

        EFT1 = an(5)+fscx(100)+fscy(100)+t1(0,(_KT/4)*10,fscx(150)+fscy(150))+t1((_KT/4)*30+1,_KT*10,fscx(100)+fscy(100))  
      
        ass_main(ASS_BUF, SubL(_BT+_j*8,_BT+_SK),pos(_X, _Y),_TXT)
        ass_main(ASS_BUF, SubL(_BT+_SK,_ET),pos(_X,_Y)+EFT1, Text = _TXT)




        for j in range (15):
            EFT2=fad(0,200)+be(1)+mov(_X,_Y,_X+100,_Y)
            EFT3=fad(0,200)+be(1)+mov(_X,_Y,_X-100,_Y)
            ass_main(ASS_BUF, SubL(_ET+j*2,_ET+30),bord(0)+blur(2)+alpha(230)+color1("#000000")+EFT2, Text = _TXT)
            ass_main(ASS_BUF, SubL(_ET+j*2,_ET+30),bord(0)+blur(2)+alpha(230)+color1("#000000")+EFT3, Text = _TXT)



    return (ASS_BUF,None)

作者: saiyaku    时间: 2014-7-19 13:15:50

yy100313 发表于 2014-7-19 12:29
Py
用的是saiyaku大神的(该不会怪我吧)
from tcaxPy import *

啊 這個腳本寫的時間太早了 現在版本的tcax已經不能用了 而且腳本寫得就很有問題。。。
要改的地方有點多
換一個吧
作者: yy100313    时间: 2014-7-19 13:48:30

居然是酱




欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/) Powered by Discuz! X2