什么是mel script ?
字串9melscript 即内含maya embedded language指令'处理程序化,或两者皆有.一般来说,就是使用mel script去执行一连串的指令.
您可以使用文字编辑器纂写mel script,之后将其储存于硬碟中,melscript的附档名为mel,mel并非scenes的一部分,你可在不同的project中重复使用mel script,每当你要重覆该动作时,你必须执行script. 字串5
读取script内容
字串7
在安装及使用script前,研读其前头(title)的资讯,叙述著有关该script的目地及使用方式,你可用文字编辑器浏览.
所有assitant内的script都包括这些资讯 .
字串4
一般script皆有不同的执行需求,阅读前头资讯,将使你知道script之间的相关性,相关的script必须是在同一个script目录下. 字串4
字串1
|
字串3
| 2.使用script editor:
你可用script editor去建立,改变或使用mel script,script editor可从window->generaleditors->scripteditor或maya 视窗的右下角打开它,script editor打开后,你可从file->openscript开启script,此时在inputsection将显示script的内容,你可按enter执行或file->execute. 注意:copy及paste到scripteditor内亦是同样的操作. 字串9 |
字串9
| source a script
经由scripteditor的file->source script 将一script打开.sourceing mel script即执行script中所有的mel指令及宣告所有global procedure,就像是openscript并执行它,只是不会在scripteditor中看到.记住,open及source只是将script置于memory中直到你执行它方有作用. |
结论:
字串2
| 现在你可以开始试试手上的script,渐渐的在你将熟悉mel的语法及功能后,此时你就可以建立你自己的script. |
评论