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

 找回密码
 新人加入
楼主: Alex
打印 上一主题 下一主题

[已解决] Apply script! [复制链接]

Rank: 4

跳转到指定楼层
楼主
发表于 2013-9-8 05:09:09 |显示全部楼层 |倒序浏览
Hi,

Why the effect(script) only applied on the first line of ass k-time file?
  1. Dialogue: 0,0:00:08.36,0:00:15.90,Default,,0000,0000,0000,,{\K52}{\K41}夜{\K37}ヲ{\K22}{\K45}覆{\K36}ウ{\K15}目{\K47}蓋{\K23}{\K23}開{\K53}ケ{\K0} {\K29}凶{\K41}キ{\K28}影{\K15}ヲ{\K28}恐{\K13}レ{\K14}ル{\K14}ナ{\K14}カ{\K164}レ
  2. Dialogue: 0,0:00:18.79,0:00:31.80,Default,,0000,0000,0000,,{\K43}{\K73}仄{\K15}く{\K29}ら{\K48}き{\K117}柩{\K42}か{\K61}ら{\K233} {\K45}産{\K55}み{\K15}堕{\K12}と{\K36}さ{\K43}れ{\K70}た{\K56}{\K104}人{\K61}形{\K42}の{\K22}よ{\K25}う{\K54}に
复制代码

Rank: 4

沙发
发表于 2013-9-8 12:32:21 |显示全部楼层
本帖最后由 Alex 于 2013-9-8 12:41 编辑

Anyway

I found the solution,  I have to change  end line number


< py file = bezier.py >     < beg line = 1 >    < end line = 5 >

Rank: 4

板凳
发表于 2013-9-8 14:58:20 |显示全部楼层
I have another question

What is the best position for _x & _y to use it for romaji (English) ?

  1.     dx = _x  
  2.     dy = _y
复制代码

Rank: 4

地板
发表于 2013-9-8 21:07:52 |显示全部楼层
本帖最后由 Alex 于 2013-9-8 21:09 编辑

thank you

this is my first FX by using TCAX
D files : http://www.speedyshare.com/EXSu9/test-s.zip

I used showjim old script, to start with TCAX
  1.     dx, dy = _x, _y

  2.     if _j == 0:
  3.         global infad
  4.         infad = 0

  5.     c1, c3 = "\\1c&HFFFFFF&", "\\3c&HFFFFFF&"
  6.     dur2 = _k * 20 + infad

  7.     line_fx = "\\bord1\\blur2\\3a&H30&"
  8.     text = "{\\an5%s%s\\move(%f1.2,%f1.2,%f1.2,%f1.2)\\fad(%f1.2,0)\\org(%f1.2,%f1.2)%s}%s" % (c1,c3,dx+70,dy,dx,dy,infad/2, dx,dy, line_fx,_txt)
  9.     ass_main(ASS_BUF, SubL(_start - 200 + infad, _start - 8 + infad, 2), '', text)

  10.     text = "{\\an5%s%s\\bord1\\blur2\\3a&H30&\\move(%f1.2,%f1.2,%f1.2,%f1.2)%s}%s" % (c1,c3,dx,dy,dx,dy,line_fx,_txt)=D
  11.     ass_main(ASS_BUF, SubL(_start - 8 + infad, _start + _elapk , 2), '', text)
  12.     infad += 50 / _n

  13.     text = "{\\an5%s%s\\bord1\\blur2\\3a&H30&\\move(%f1.2,%f1.2,%f1.2,%f1.2)\\t(\\fscx150\\fscy150)\\t(\\alpha&H%d&)%s} %s" % (c1,c3,dx, dy, dx ,dy,dur2,line_fx,_txt)
  14.     ass_main(ASS_BUF, SubL(_start + _elapk, _start + _elapk + _k*1.5, 3), '', text)
复制代码
thank you =D

Rank: 4

5#
发表于 2013-9-8 21:11:14 |显示全部楼层


My new question is, how i will use char method and pixel ?

Rank: 4

6#
发表于 2013-9-8 21:33:22 |显示全部楼层
本帖最后由 Alex 于 2013-9-8 21:34 编辑
milkyjing 发表于 2013-9-8 21:12
Good job~

tips: TCAX provides ASS tag functions, such as pos(_x, _y), t(t1, t2, a, code), color1( ...


yes I know that, and it's same like a lua by using  zheox library (zheolib \ Spanish guy)
but i like to use a lua method
no problem i will start to use provides way =D

thank you 4 examples and tutorials


-

Rank: 4

7#
发表于 2013-9-13 17:22:54 |显示全部楼层
there is problem in line 39 - return (ASS_BUF, TCAS_BUF)
I don't know why exactly ?
  1. from tcaxPy import *
  2. from extLibs.small_code import *


  3. def tcaxPy_Init():
  4.     global _Fs
  5.     global _Spacing
  6.     global Font
  7.     global pos_fix
  8.     _FontFileName = GetVal(val_FontFileName)
  9.     _FaceID       = GetVal(val_FaceID)
  10.     _Fs           = GetVal(val_FontSize)
  11.     _Spacing = GetVal(val_Spacing)
  12.     Font = InitFont(_FontFileName, _FaceID, _Fs, _Spacing, GetVal(val_SpaceScale), MakeRGB(0, 0, 0), 0, False)


  13. def tcaxPy_Fin():
  14.     FinFont(Font)

  15. def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):

  16.     ASS_BUF  = []      
  17.     TCAS_BUF = []   

  18.     dx = _x         
  19.     dy = _y     

  20.     ts_0 = _start - 40 + 2 * _FD / 10 * _j
  21.     ts = ts_0 + 40
  22.     te = _end - 2 * _FD / 10 * (_n - _j - 1)
  23.     te_0 = te + 40


  24.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 1), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(3) + blur(2), _txt)
  25.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 2), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(1) + color3('000000'), _txt)
  26.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 3), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(0), _txt)


  27.   return (ASS_BUF, TCAS_BUF)
复制代码


Rank: 4

8#
发表于 2013-9-14 00:04:25 |显示全部楼层
本帖最后由 Alex 于 2013-9-14 13:58 编辑

Yeah, u r right, it's working now

k, I used picture after that I applied the effect(script), the result was TCAS file not ass file (fx)
so what is the way to deal with this kind of file?


sorry man, I have a lots of questions

Rank: 4

9#
发表于 2013-9-14 20:52:31 |显示全部楼层
本帖最后由 Alex 于 2013-9-15 02:07 编辑


thank you

Rank: 4

10#
发表于 2013-9-15 02:56:19 |显示全部楼层
本帖最后由 Alex 于 2013-9-15 03:03 编辑

Wt is the problem again  



font+script+ass file+pic : http://www.megafileupload.com/en/file/450991/test-fx-zip.html



-

Rank: 4

11#
发表于 2013-9-15 15:55:07 |显示全部楼层
本帖最后由 Alex 于 2013-9-15 16:03 编辑

thank you,

it's really good to learn and know new things


OK, I want to know how can i use char(fx)
and is this tool supporting Arabic lang.


thank you  

Rank: 4

12#
发表于 2013-9-15 20:08:08 |显示全部楼层
本帖最后由 Alex 于 2013-9-15 20:11 编辑

Char = character (letter)
it's making each letter separately in each line

Eaxample : http://docs.aegisub.org/manual/K ... _Template_modifiers

Other modifiers >> Char

I read that FreeType Library supporting AR language (Right to left Language)
anyway i will test by myself  


thank you

Rank: 4

13#
发表于 2013-9-18 06:26:14 |显示全部楼层
本帖最后由 Alex 于 2013-9-18 06:32 编辑

I already saw this example, I think there's no a property/advantage (function) in TCAX to helping make a simple char fx

there is a char function in aegisub (Template/auto.4) & NyuFx(line/syl/char/word) to separately each letter in each line
eaxmple :

{\k20}ko{\k35}ne
it will be like this if we are going to use char property(function)
{\k10}k
{\k10}o
{\k12}n
{\k13}e


I think u you guys not interesting about it, because chines alphabet no need for this kind of property

I can't make like this effect if there is no like this function
anyway, thank u very much =D


Rank: 4

14#
发表于 2013-9-19 21:40:58 |显示全部楼层
finally, I found the method to make that effect
testings still continue XD
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-5-5 04:17

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH