Hi,
The problem in your code is that you are calling your studio file only 1 time for every asset so the render paths are getting overwritten. I made some changes to your code and looped the studio file to be opened seperately for every asset and save the renders according to camera names.
Here is the code:
rendSaveFile = true
_frame = 0
studioFile = getOpenFileName caption: "Select the Studio Asset"
directoryParent = getSavePath caption: "Select the Parent Directory"
dirPath = directoryParent + "\*"
dirList = getDirectories dirPath
print dirList
renderPath = getSavePath caption: "Select a Folder to Save the Renders"
for dir in dirList do(
assetsPath = dir + "\*.max"
assetsList = getFiles assetsPath
print assetsList
for current in assetsList do(
loadMaxFile studioFile
xrefs.addNewXRefFile current
currentName = getFilenameFile current
currentAssetPath = (renderPath + "\\" + currentName)
makeDir currentAssetPath
for c in cameras where classof c != Targetobject do(
currentRenderPath = (currentAssetPath + "\\" + c.name)
makeDir currentRenderPath
render camera:c outputfile:(currentRenderPath + "\\" + currentName + "_" + c.name + ".jpeg")
if c.name == "CAM_RENDER_TURN" then(
turnPath = (currentRenderPath + "\\" + "360")
makeDir turnPath
render camera:c fromframe:0 toframe:10 outputfile:(turnPath + "\\" + currentName + "_" + _frame as string + ".jpeg")
_frame += 1
)
)
xrefs.deleteAllXRefs()
)
)
I hope this helps.