Loading renderpresets via Maxscript

Hi! This may be an easy one, but I'm stuck.

I try to load a renderpreset via maxscript. So I checked the reference and cam up with this:

renderPresets.LoadAll 0 "X:\\projects\presets\turntable_preset.rps"

Unfortunatly it doesn't do nothing, it is only replying "false". It is a preset for Vray settings, working on max 2014. Somebody has an idea why it doesn't work?

Thanks!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Xkontod's picture

Working perfectly in

Working perfectly in thisway!

on Lrps_1 pressed do
renderPresets.LoadAll 0 (GetDir #maxroot + "\\scripts\\Studios\\Renderpr\\Render1.rps")

Just needs to be a "renderPresets.LoadAll" Not "renderPresets.Load"

Thank you miauu!

Now how can i make that message box to confirm like "Render presets 1 loaded" or displayng status, of a active render name somewhere in dialog?:)

Xkontod's picture

Sorry, i comment wrong

Sorry, i comment wrong post.:(
But i get help... thank you!

miauu's picture

rpsFilePath =

rpsFilePath = "X:\\projects\presets\turntable_preset.rps"
 
if doesFileExist rpsFilePath then
(
	renderPresets.LoadAll 0 rpsFilePath
        messagebox "Render presets 1 loaded" title:""
-- but you will have to close the messagebox, so you an add a label contorl and when the rps is loaded you can update its text property like this:
        lab_rpsLoadingStatus.text = "Render presets 1 loaded"
-- if you don't like the label you can use a textbox control and upadte its text property:
        et_rpsLoadingStatus.text = "Render presets 1 loaded"
)
else
	messagebox "The RPS file can't be located" title:""
Xkontod's picture

How is possible that load

How is possible that load output file size to?
If i load manually *.rps file then loads output size, but if i load via script, then not..

jahman's picture

.

try this

preset_path  = @"C:\Users\User\Documents\3dsmax\renderpresets\test.rps"
preset_categories = renderpresets.LoadCategories preset_path
renderpresets.Load 0 preset_path preset_categories
kernberg's picture

Hi thanks for your answer. I

Hi thanks for your answer. I tried it, but it seems like max doesnt find the file. First I thought it might be a problem of the server but it also doesnt work locally... reallly strange. When I call on of the default scanline presets it works ^^

kernberg's picture

I already tried if that could

I already tried if that could be the reason, but unfortunatly it doesnt change if I select vray first

miauu's picture

.

The path to the .rps file is correct, right? And the .rps file exist?

When renderPresets.LoadAll is used the FALSE is returned when the rps file can't be located(not exist or the pat is not correct).

Try this:

rpsFilePath = "X:\\projects\presets\turntable_preset.rps"
 
if doesFileExist rpsFilePath then
	renderPresets.LoadAll 0 rpsFilePath
else
	messagebox "The RPS file can't be located" title:""
Atlex86's picture

rpsFilePath = (GetDir

rpsFilePath = (GetDir #renderPresets +"\\turntable_preset.rps") if doesFileExist rpsFilePath then renderPresets.LoadAll 0 rpsFilePath else messagebox "The RPS file can't be located" title:""

miauu's picture

.

Is the Vray currently active render?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.