Change VRaylog file default location to default to Project Folder instead ?

VRayLog.txt is saved in %TEMP% folder, but I’d like to know how to change this so that it will always default to the Project Folder.

Is there a syntax for ‘current’ project folder ? (rather than everytime going into the Render Dialog Box and manually choosing the Project Folder) ?

Thanks.

Maybe this short script would be useful:


logSavePath = pathConfig.getCurrentProjectFolder() + maxFileName + "_VRayLog.txt";
renderers.current.system_vrayLog_file = logSavePath;

Thanks for this Miroslav,

Please can you tell me how to refine this script ?

currently it will make;

c:\project_foldermaxfile,

And I’d like it to make

c:\project_folder\maxfile

Many thanks.

It’s okay, good ole Morne kindly helped me out;

logSavePath = pathConfig.getCurrentProjectFolder () + @“” + “VrayLog.txt”;
renderers.current.system_vrayLog_file = logSavePath;

Will do it :slight_smile:

Nice. Thanks for sharing the amended script.

I’ve just learned (thanks again Morne !) that when putting code online, if it isn’t placed within code tags, certain characters could be missing (there should be a \ between the double-quotes) - this is the correct code below;

 logSavePath = pathConfig.getCurrentProjectFolder () + @"\" + "VrayLog.txt";
renderers.current.system_vrayLog_file = logSavePath; 

Wondering if there’s anyone out there that can fix this for 2023, that code throws up errors, first with that @“” code, and further (I think it didn’t like system_vrayLog_file) if you take it out (not that I know what I’m doing…)

Works fine on my end. What errors are you getting? Is V-Ray the active render engine?