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

 找回密码
 新人加入
查看: 3866|回复: 1

【youkaze】一些有的没的记录 [复制链接]

Moderator

youkaze

Rank: 5Rank: 5

发表于 2012-8-5 10:40:41 |显示全部楼层
  1. if not (_txt == '' or _txt == ' ' or _txt == ' '):
复制代码
使用user函数 跳过 半角空格 全角空格 “空字符”

以下是非user
  1. if _txt == '' or _txt == ' ' or _txt == ' ' :
  2.     continue
复制代码
2

查看全部评分

Moderator

youkaze

Rank: 5Rank: 5

发表于 2012-9-15 23:48:45 |显示全部楼层
坑掉的内置ext_you005

这个本来是弄成内置的 因为是内置脚本in main out 几个脚本都是分开的 字幕层的设置就比较蛋疼了所以就不当内置发了
就丢这里了

ext05.jpg
  1. ################################################################################
  2. ### description:
  3. ### fade in with font size animation


  4. from tcaxPy import *


  5. def tcaxPy_Init():
  6.     global _FD                              # frame duration, in millisecond
  7.     global _Fs
  8.     _FD = 1000 / GetVal(val_FXFPS)
  9.     _Fs = GetVal(val_FontSize)
  10.    



  11. def tcaxPy_Fin():
  12.     pass


  13. def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):
  14.     ASS_BUF  = []        # used for saving ASS FX lines
  15.     TCAS_BUF = []        # used for saving TCAS FX raw data

  16.    
  17.     ts = _start + _elapk                                   # start time, in semi-second
  18.     te = _start + _elapk + _k                              # end time, in semi-second
  19.     YK = randint(-5,5)
  20.     SCOLOR1 = color1('D8D6FF')     #颜色可以自己改
  21.     for i in range(8):
  22.         ass_main(ASS_BUF, SubL(ts+20-i*8,te,2),an(7)+pos(_x,_y)+fad(200,0)+frz(i*45)+bord(0)+shad(0)+SCOLOR1 + p(2), "m 0 -6 b 7 -17 11 -26 2 -44 b -7 -31 -8 -18 0 -7")
  23.         ass_main(ASS_BUF, SubL(te,te+20+YK,2),an(7)+pos(_x,_y)+frz(i*45)+bord(0)+shad(0)+SCOLOR1 + p(2), "m 0 -6 b 7 -17 11 -26 2 -44 b -7 -31 -8 -18 0 -7")
  24.         ass_main(ASS_BUF, SubL(te+20+YK,te+70+_j*5,2),an(7)+mov(_x,_y,_x-40+randint(-20,20),_y+20+randint(-20,20))+fad(0,200+randint(-20,50))+frz(i*45)+t(frz(0+randint(0,360))+frx(0+randint(0,360))+fry(0+randint(0,360)))+bord(0)+shad(0)+SCOLOR1 + p(2), "m 0 -6 b 7 -17 11 -26 2 -44 b -7 -31 -8 -18 0 -7")
  25.         
  26.     return (ASS_BUF, TCAS_BUF)
复制代码
1

查看全部评分

您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-29 16:40

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH