Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Corona Goodies - User Contributions => Topic started by: Christa Noel on 2017-02-28, 08:19:22

Title: MaxScript Denoise all RenderElements
Post by: Christa Noel on 2017-02-28, 08:19:22
hi,
I don't know if this kind of script is already exist here. I just want to share this tiny script.
just runscript it and it will enable all RenderElements you have. or you can add this to RenderSetup>CommonTab>ScriptRollout>Pre-Render>file
cheers!
Title: Re: MaxScript Denoise all RenderElements
Post by: Jens on 2017-03-07, 12:02:43
Thank you Christa! Just what I was searching for after a project with 15 different LightSelect passes that took ages to denoise and it was frustrating to turn denoising on/off on each when testing :)

Do you happen to have one that clears the "save path" on all render elements? It's the "Error creating file output" message that happens randomly when using the "Save File" under Render Output in the Common tab. I tried the script listed in the help here: https://coronarenderer.freshdesk.com/support/solutions/articles/5000672469-i-am-getting-error-creating-file-output-message- (https://coronarenderer.freshdesk.com/support/solutions/articles/5000672469-i-am-getting-error-creating-file-output-message-) but it doesn't work. Again I have to go in on all elements and delete the path manually...
Title: Re: MaxScript Denoise all RenderElements
Post by: Christa Noel on 2017-03-07, 12:49:15
Thank you Christa! Just what I was searching for after a project with 15 different LightSelect passes that took ages to denoise and it was frustrating to turn denoising on/off on each when testing :)

Do you happen to have one that clears the "save path" on all render elements? It's the "Error creating file output" message that happens randomly when using the "Save File" under Render Output in the Common tab. I tried the script listed in the help here: https://coronarenderer.freshdesk.com/support/solutions/articles/5000672469-i-am-getting-error-creating-file-output-message- (https://coronarenderer.freshdesk.com/support/solutions/articles/5000672469-i-am-getting-error-creating-file-output-message-) but it doesn't work. Again I have to go in on all elements and delete the path manually...
Hi jens, youre welcome
That could be caused by read only directory or doesnt exist path.
I'll write a script for that tomorrow.
Title: Re: MaxScript Denoise all RenderElements
Post by: Christa Noel on 2017-03-08, 13:44:00
Hi, Here's attached is the script for set all renderElements output path. The browse directory dialog will run first and The filename defaultly will be "scenefilename"+"elementName"+".jpg"
Title: Re: MaxScript Denoise all RenderElements
Post by: Jens on 2017-03-08, 20:11:43
Wow, you are fast Christa! Thank you. Now I don't want to sound ungrateful at all, but what I was looking for was a way to clear all the paths. I always save my main render output in .exr so all the passes goes in to that one = no need for saving out each pass :)

But sometimes 3ds max puts in a path (which to me looks perfectly valid) and I get the "Error creating file output" non the less. I fix it by manually clearing the path on all elements since the help provided by Corona Helpdesk doesn't work for me:

If it is caused by an invalid output path, then you can clear it:

Close "Render Setup" window
Copy this line into MAXScript listener (F11, or the pink box in the lower-left corner of the 3Ds Max UI):

rendOutputFilename = ""
Title: Re: MaxScript Denoise all RenderElements
Post by: Christa Noel on 2017-03-09, 04:44:48
I've deleted the script above. use the new script in attached file. run the script, and a query will show, press yes to set the outputpath to custom path, no to clear the path, cancel to abort.
enjoy :)
Title: Re: MaxScript Denoise all RenderElements
Post by: Jens on 2017-03-12, 14:57:45
Works perfectly! Thank you so much Christa :)
Title: Re: MaxScript Denoise all RenderElements
Post by: Nik on 2017-03-14, 08:35:43
As far as I know there is no way to "clear path" for render elements. If you clear it, then it will be replaced by default automatically and save in default folder. I tried. Path remains empty until you start render.

UPD.
Oh, it seems you need to clear paths to overwrite them and get rid of an error. My bad :)