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

 找回密码
 新人加入
查看: 3638|回复: 5

【几年】Notes [复制链接]

Rank: 4

发表于 2015-10-27 21:39:21 |显示全部楼层
Aegisub使用的正则是wxWidgets的,语法参考这里
配合Select lines非常好用
选中空行 ^[\s]*$

Rank: 4

发表于 2015-12-7 13:16:01 |显示全部楼层
pyointa2001在Aegisub论坛回答的几个帖子
1,http://forum.aegisub.org/viewtopic.php?f=13&t=70235
  1. Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,template line,{\shad0\c&H7C07E1&\3c&HFFFFFF&}
  2. Comment: 1,0:00:00.00,0:00:00.00,Default,,0,0,0,template pre-line ABC,{\shad0\clip(!$left-line.styleref.outline!,!$top-line.styleref.outline!,!$right+line.styleref.outline!,!$bottom+line.styleref.outline!)}
  3. Comment: 1,0:00:00.00,0:00:00.00,Default,,0,0,0,template line ABC,{\shad0\t($sstart,$send,\clip(!$sright+line.styleref.outline*0.5!,!$stop-line.styleref.outline!,!$lright+line.styleref.outline!,!$sbottom+line.styleref.outline!))}
  4. Comment: 0,0:00:05.73,0:00:11.80,Default,,0,0,0,karaoke,{\k37}喧{\k49}騒{\k23}と{\k29}乱{\k29}舞{\k20}の{\k62}間{\k26}に{\k56}{\k29}興{\k37}奮{\k26}す{\k37}る{\k44}狂{\k21}お{\k25}し{\k18}さ{\k37}で
  5. Comment: 0,0:00:12.11,0:00:14.28,Default,,0,0,0,karaoke,{\k24}掻{\k10}い{\k23}た{\k43}汗{\k40}が{\k15}落{\k24}ち{\k28}る
复制代码
同样作用于furi时的代码
  1. Comment: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,template syl furi,{\an5\pos($center,$middle)\c&H7C07E1&\3c&HFFFFFF&}
  2. Comment: 1,0:00:05.00,0:00:07.00,Default,,0,0,0,template syl furi,{\an5\pos($center,$middle)\clip(!$left-line.styleref.outline!,!$top-line.styleref.outline!,!$right+line.styleref.outline!,!$bottom+line.styleref.outline!)\t($start,$end,\clip(!$right+line.styleref.outline!,!$top-line.styleref.outline!,!$right+line.styleref.outline!,!$bottom+line.styleref.outline!))}
  3. Dialogue: 0,0:00:05.73,0:00:11.80,Default,,0,0,0,karaoke,{\k37}喧|けん{\k49}騒|そう{\k23}と{\k29}乱|らん{\k29}舞|ぶ{\k20}の{\k62}間|あいだ{\k26}に{\k56}
  4. Dialogue: 0,0:00:12.11,0:00:15.28,Default,,0,0,0,karaoke,{\k24}掻|か{\k10}い{\k23}た{\k43}汗|あせ{\k40}が{\k15}落|お{\k24}ち{\k28}る
复制代码
和kf相比主体和边框都变
$left的值是否包括边框的值
尽量使用的半角的空格,不然位置的计算可能会出现误差。
同这个帖子http://forum.aegisub.org/viewtopic.php?f=13&t=70259
2,http://forum.aegisub.org/viewtopic.php?f=13&t=70158
ci[]数组的作用和原理
很多youtube上代码都有的 字符计数
ci[1] is similar to syl.i. syl.i is syllable index but ci[1] is character index.
syl.i is defined by automation4 , but automation4 neither defines nor counts character index. so you have to define and count it on your own.

char_couter is a function to count character index. this function does not return anything but stores index number to table ci for later reference.

as you know char class template is executed number of characters.
char_counter counts the index of the current character at every time and stores it to table ci.

example : single use
code once : function char_counter(ref) ci[ref] = ci[ref] + 1 return "" end
code line : ci = {0}
template char : !char_counter(1)!!retime("start2syl",(ci[1]-1)*50,0)!

example : multiple use in same style
code once : function char_counter(ref) ci[ref] = ci[ref] + 1 return "" end
code line : ci = {0,0}
template char : !char_counter(1)!retime("start2syl",(ci[1]-1)*50,0)!
template char : !char_counter(2)!retime("start2syl",(ci[2]-1)*50,0)!
you have to use different key to store a separate index number for every template.

3,http://forum.aegisub.org/viewtopic.php?f=13&t=69846
The text is always stripped when you use the char modifier.

4,http://forum.aegisub.org/viewtopic.php?f=13&t=69891
元音字符和非元音字符使用不同的效果
you cannot do it with fxgroup, but can do around it.
code syl : define fxarray table and set if each character of syllable is vowel or not.
tempalte char : call charsyl_counter to get current character's index and look up fxarray with the index.
if fxarray is true, call fxvowel function to get actual output line for vowel character else call fxconso function .
  1. Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code once,function charsyl_counter(ref) csi[ref] = csi[ref] + 1 return "" end
  2. Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code once,function fxvowel()  return "\\1c&HFF00FF&" end
  3. Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code once,function fxconso() return "\\1c&H00FF00&" end
  4. Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code syl,csi = {0} fxarray = {} i = 1 for c in _G.unicode.chars(syl.text_stripped) do  fxarray[i] = string.match(c,"[aiueoAIUEO]")  i = i + 1 end
  5. Comment: 0,0:00:05.00,0:00:05.00,Default,,0,0,0,template char,!charsyl_counter(1)!{\an5\pos($center,$middle)!fxarray[csi[1]] and fxvowel() or fxconso()!}
复制代码
5,http://forum.aegisub.org/viewtopic.php?f=13&t=69891
小球跳动利用org和frz
  1. !retime("syl",0,0)!{\an5\move($scenter,$top,!$si == #line.kara and line.right + syl.width/2 or line.left+line.kara[syl.i+1].center!,$top)\org(!-1000+$right!,$top)\t(0,!line.duration/2!,\frz2)\t(!line.duration/2!,!line.duration!,\frz0)\p1}m 21 30 b 0 30 0 0 21 0 b 41 0 41 30 21 30 m 21 6 l 19 12 l 12 12 l 18 16 l 15 23 l 21 18 l 27 23 l 24 16 l 30 12 l 23 12
复制代码

Rank: 4

发表于 2015-12-7 13:16:20 |显示全部楼层
本帖最后由 几年 于 2016-7-18 08:41 编辑

https://en.wikipedia.org/wiki/Voronoi_diagram

Rank: 4

发表于 2015-12-12 14:54:57 |显示全部楼层
学习了!

Rank: 4

发表于 2015-12-15 20:17:45 |显示全部楼层
在同一行打出{} 仅适用于libass
  1. \{hello world!\}
复制代码

Rank: 4

发表于 2016-9-15 10:08:03 |显示全部楼层
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-29 08:07

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH