我是脚本的新手,我正在尝试导出场景中的对象并单独渲染所有选定对象的图像。
现在我的代码只能根据我的对象具有的任何名称导出FBX文件,并且可以渲染一个图像。
for current in geometry do
(
select current
newFileName = current.name
newFilePath = pathConfig.GetDir #Export
completeFilePath = (newFilePath + "/" + newFileName)
exportFile completeFilePath #noPrompt selectedOnly:true using:FBXEXP
render renderType:#selected
--render current frame:1 outputfile:"testRender.png"
)
我想导出,在场景中渲染每个选定的对象(单独),将其保存为.png,并在渲染图像上使用对象的名称。
试试这个:
for current in geometry do
(
select current
newFileName = current.name
newFilePath = pathConfig.GetDir #Export
completeFilePath = (newFilePath + "/" + newFileName)
exportFile completeFilePath #noPrompt selectedOnly:true using:FBXEXP
render renderType:#selected
outputFilePath = (newFilePath + "/" + newFileName + ".png")
render current frame:1 outputfile:outputFilePath
)