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

 找回密码
 新人加入
查看: 4617|回复: 0
打印 上一主题 下一主题

[tcaxPy] Multiple ASS Style Support [复制链接]

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

跳转到指定楼层
楼主
发表于 2011-10-26 18:35:17 |只看该作者 |倒序浏览
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.



AssStyles.py

2.9 KB, 下载次数: 2065

v0.1

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

GitHub|TCAX 主页

GMT+8, 2024-11-25 03:04

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH