ScriptSpot home

Forum topic · Scripts Wanted

Render Element Output

By JokerMartini · 2011-02-16

Description

I just want a simple script that takes the current save location of the "Render Output" and updates all the render elements to the same location.

Comments (2)
JokerMartini

This is not working.

Here is the scenario. Set up a new scene with a sphere in it. Render Elements Specular, Diffuse, Lighting.
Main output path is set to folder names V01. All the elements are targets to V01 as well.

I made some lighting changes and then changed the main output path to folder V02. No elements updated to I ran this script and its still saying my main output path is still V01??????


function setUpRenderElements =
(
MainSavePath = getFileNamePath rendOutputFilename
print MainSavePath

re = maxOps.GetCurRenderElementMgr()
numb = re.numrenderelements()

for i=0 to (numb-1) do
(
el = re.getrenderelement i
currentFileName = (fileNameFromPath (re.GetRenderElementFileName i))
newDirectory = MainSavePath+"\\"+el.elementname
if re.GetElementsActive() then makeDir newDirectory
newFileName = newDirectory +"\\"+ currentFileName
re.SetRenderElementFileName i newFileName
)
)
setUpRenderElements()