Mayatomr [-active] [-addHosts string] [-addIncludes string] [-addLinks string] [-binary] [-camera string] [-echo] [-exportFilter int] [-exportFilterString string] [-exportPathNames string] [-exportStartFile] [-file string] [-fragmentChildDag] [-fragmentExport] [-fragmentIncomingShdrs] [-fragmentMaterials] [-immediateModeRender boolean] [-init] [-layer string] [-license string] [-listHosts] [-listLinks] [-logFile] [-miStream] [-padframe uint] [-pauseTuning boolean] [-perframe uint] [-preview] [-previousView] [-project string] [-region] [-regionRect uint uint uint uint] [-removeHosts string] [-removeLinks string] [-render] [-renderNoSlaves] [-renderTarget string] [-renderThreads uint] [-renderVerbosity uint] [-tabstop uint] [-updateHosts] [-updateRayrc] [-verbosity uint] [-xResolution uint] [-yResolution uint]
通过该 MEL 命令,可访问 mental ray for Maya 插件的大多数功能,包括 .mi 文件导出、预览和批渲染、网络渲染以及着色器管理。active, addHosts, addIncludes, addLinks, binary, camera, echo, exportFilter, exportFilterString, exportPathNames, exportStartFile, file, fragmentChildDag, fragmentExport, fragmentIncomingShdrs, fragmentMaterials, immediateModeRender, layer, license, listHosts, listLinks, logFile, miStream, padframe, pauseTuning, perframe, preview, previousView, project, region, regionRect, removeHosts, removeLinks, render, renderNoSlaves, renderTarget, renderThreads, renderVerbosity, tabstop, updateHosts, updateRayrc, verbosity, xResolution, yResolution
值 | 位置 | 值 |
FilterLink | 0 | 1 |
FilterInclude | 1 | 2 |
FilterVersion | 2 | 4 |
FilterTextures | 3 | 8 |
FilterObject | 4 | 16 |
FilterGroup | 5 | 32 |
FilterLight | 6 | 64 |
FilterCamera | 7 | 128 |
FilterMaterial | 8 | 256 |
FilterOptions | 9 | 512 |
FilterFunction | 10 | 1024 |
FilterFuncDecl | 11 | 2048 |
FilterPhenDecl | 12 | 4096 |
FilterUserData | 13 | 8192 |
FilterInstObject | 14 | 16384 |
FilterInstGroup | 15 | 32768 |
FilterInstLight | 16 | 65536 |
FilterInstCamera | 17 | 131072 |
FilterInstFunction | 18 | 262144 |
FilterRender | 19 | 524288 |
FilterCustomText | 20 | 1048576 |
FilterCustomShader | 21 | 2097152 |
FilterCustomPhen | 22 | 4194304 |
pow 2 pos
示例:若要不写入(剪切掉)“link”和“include”语句,您将给出 Mayatomr -mi -file fileName -exportFilter 3
一个方便的 MEL 函数 miExportFilterValue(string $entries[]) 可用于根据提供的说明性类型名称计算最终整数参数,像“link”、“include”,等等。支持的类型名称列表可在文件 mentalrayUI.mel 中找到。
所有文件引用可以强制为相同,使用值:abs - 绝对路径,rel - 相对路径,non - 无路径。
此外,该字符串可以指定每个单独的文件引用,其中字符串中的每个字符表示单个文件引用条目,意义分别为:0 - 无更改,1 - 绝对路径,2 - 相对路径,3 - 无路径,或 0 - 无更改,a - 绝对路径,r - 相对路径,n - 无路径。
文件引用条目按照如下顺序指定:链接库、包含 mi 文件、纹理文件、光照贴图、灯光剖面、输出图像、阴影贴图、最终聚集贴图、光子贴图、需要加载对象 mi 文件。默认设置:无更改。
例如,“-xp aarrararra”将针对链接库、包含文件、灯光剖面、阴影贴图、需要加载对象 mi 文件使用绝对路径,以及针对纹理文件、光照贴图、输出图像、最终聚集贴图、光子贴图使用相对路径。如果单独的文件引用字符串没有完全指定,那么将为其余的所有文件引用假定使用最后的字符。因此,例如,“-xp aarra”等同于“-xp aarraaaaaa”
// Render the lower left corner of the image to the render view with // progress messages. persp camera is used to render the image. Mayatomr -preview -v 5 -region -rr 0 0 300 300 -camera perspShape; // Batch render occlusionLayer with occlusionCamera, with 1k square // resolution. Mayatomr -render -layer occlusionLayer -xResolution 1024 -yResolution 1024; // Export the scene to test.mi file with tabstop value 8. // Texture files exported with absolute path, and all other file entries // are exported with no path. Mayatomr -mi -tabstop 8 -xp "3313333333" -file "test.mi";