Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在 Maya 中开发 mel 脚本,但无法根据其 ascii 代码打印字符(例如 65 应打印 'A'),就像其他语言中的 char(xx) 命令一样。
我怎样才能做到这一点?谢谢 !
另一种方法是在 MEL 脚本中使用 python 命令:
$n = 65; print("BB" + python("chr("+$n+")") + "CC");
结果:
BBACC
如果有人正在寻找相同的答案,我最终实现它的方式是创建一个包含所有字符的字符串,然后使用 substring 命令在字符串中选择正确的字符。