Notifications
Clear all

[Closed] Editing MR properties with Maxscript

General question here… I’m trying to modify any MR property with a little button, and my question is this:

If my renderer is set to Mental Ray, why does this line work?

renderers.current.FinalGatherBounces = 1

But this line does not work?

mental_ray_renderer.FinalGatherBounces = 1

So for my example, lets say I want to set Diffuse Bounces, Turn on Final Gather, and set minimum and maximum samples per pixel. Should I use renderers.current or Mental_Ray_Renderer? Or is there another way I should be doing this?

2 Replies

you have to create a mental ray instance first, something like…

mr = mental_ray_renderer();
  mr.finalgatherbounces = 1;
  renderers.current = mr;

or even…

mr = mental_ray_renderer();
 renderers.current = mr;
 mr.finalgatherbounces = 2;

That was it! I tried making the instance, but I forgot to do the renderers.current = mr line. Thank you!