V-Ray GPU: Can't set properties via Maxscript

I need to control some render parameters programmatically. But when I try to do this:


rt = VRayRT()
rt.renderMask_type = 0
​

… it throws an exception:
-- Runtime error: Attempt to set read-only property: renderMask_type

I really need to get this working. What can I do to make this work? Why is it a read-only property? Is there some other way to set this?

This is with V_Ray_GPU_6_Update_1_2:V_Ray_GPU_6_Update_1_2 in 3ds Max 2024.

Thanks!

Hello @simon_lundberg

You can use this maxScript command to modify the V-Ray GPU render mask:
rt.V_Ray_settings.imageSampler_renderMask_type​

The .renderMask_type property you tried to utilize provides just read-only access to the .V_Ray_settings.imageSampler_renderMask_type​ property by design.

Best regards,
Margarita

Thank you, Margarita! It would have been nice if that was documented somewhere, or had a more clear error thrown. :slight_smile:

Here is one documentation page that might be of help.​ Read carefully till the end of this page for V-Ray GPU.
You can type showproperties vr.V_Ray_settings in the 3ds Max listener (F11) and this will give you a list of all available properties for GPU and after that you can use the search to find what you need.

​