Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: ThomasCoote on 2017-11-07, 11:50:14

Title: Script to delete output path of ALL render elements?
Post by: ThomasCoote on 2017-11-07, 11:50:14
Hi,

A previous company I worked at had a custom script for removing the Output path of ALL render elements at once, does anyone familiar with MaxScript know how I might go about making this? I'm being driven crazy by "Error Creating File Output" and finding Max has suddenly decided to try save all my elements to a random, non-existent network location.
Title: Re: Script to delete output path of ALL render elements?
Post by: NicolasC on 2017-11-07, 12:48:36
Hello,

First, close Render Setup window. Then try that:

Code: [Select]
re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()  do re.SetRenderElementFilename i ""

Thanks to SugaR for this piece of code :)
Title: Re: Script to delete output path of ALL render elements?
Post by: 3dboomerang on 2017-11-07, 12:52:10
same here, although I'm looking for a script that automaticaly sets the paths of all the render elements into the path of the "save as" for the main render -
Title: Re: Script to delete output path of ALL render elements?
Post by: NicolasC on 2017-11-07, 12:59:24
same here, although I'm looking for a script that automaticaly sets the paths of all the render elements into the path of the "save as" for the main render -
http://www.scriptspot.com/3ds-max/scripts/normalize-render-elements
Title: Re: Script to delete output path of ALL render elements?
Post by: 3dboomerang on 2017-11-07, 15:11:37
holy balls... i've seen so much help over the past few days, it's rendering the-area absolete

thanks
Title: Re: Script to delete output path of ALL render elements?
Post by: ThomasCoote on 2017-11-07, 16:58:35
Hello,

First, close Render Setup window. Then try that:

Code: [Select]
re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()  do re.SetRenderElementFilename i ""

Thanks to SugaR for this piece of code :)

This works perfectly, thank you for sharing!
Title: Re: Script to delete output path of ALL render elements?
Post by: 3dboomerang on 2017-11-08, 09:27:23
the script to normalise the render elements to the path of the main render doesn't seem to be supported in the latest max version :( I'll keep looking for something similar then, but thanks :)
Title: Re: Script to delete output path of ALL render elements?
Post by: NicolasC on 2017-11-08, 11:18:10
the script to normalise the render elements to the path of the main render doesn't seem to be supported in the latest max version :( I'll keep looking for something similar then, but thanks :)
Hmmm not tested myself. Maybe worth sending a message to the creator ?
Title: Re: Script to delete output path of ALL render elements?
Post by: 3dboomerang on 2017-11-30, 10:32:19
i did - no date on the updated version - "whenever" i suppose :)
Title: Re: Script to delete output path of ALL render elements?
Post by: Luis.Goncalves on 2017-12-06, 10:09:32
Please try this guys

Save your file - go the the render elements tab and delete all your elements - Merge the elements from the file you just saved (there's a merge button in the render elements tab)

When you merge them, they should reacquire the output that you have in the "save file".