Maya VRay 更改输出图片格式

想通过代码更改输出图片格式,不使用Python,使用mel。在Render Settings上修改,Script Editor显示如下:

setAttr "vraySettings.imageFormatStr" 2;

是修改为jpg的。但是如果直接这样使用,会提示出错。

 Error: line 1: setAttr: 'vraySettings.imageFormatStr' is not a simple numeric attribute. Its values must be set with a -type flag.

做如下修改即可:

setAttr -type "string" "vraySettings.imageFormatStr" "jpg";

注意顺序,不然会失败。-type要先写。

参考地址:https://forums.chaosgroup.com/forum/v-ray-for-maya-forums/v-ray-for-maya-general/67731-mel-to-change-image-format-on-the-fly

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章