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

标题: [tcaxPy] Multiple ASS Style Support [打印本页]

作者: milkyjing    时间: 2011-10-26 18:35:17     标题: [tcaxPy] Multiple ASS Style Support

To add the support of multiple ASS style and avoiding the modification of the TCC file, we can use the inherited ASS header, see http://www.tcax.org/forum.php?mod=viewthread&tid=54.

And to ease the access to the values stored in the ASS header string, we need a wrapper class named AssStyles which is a container of AssStyle objects.


Implementation Tips

1. styles = AssStyles(GetVal(val_AssHeader)), the constructor extracts the information in the ASS Header string and store them in the AssStyles class instance.
2. The AssStyles class has a dict to hold the AssStyle objects, style = styles['style_name']
3. we can then access to the style values by style.name, style.fs, etc.





附件: [v0.1] AssStyles.py (2011-10-27 09:18:52, 2.9 KB) / 下载次数 1526
http://www.tcax.org/forum.php?mod=attachment&aid=OTh8MzNlNTBkNjB8MTcxNDY0NDkwM3wwfDA%3D




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