Change Path Tracing Sample by Code

Hello,

Is there a way to change the passes by code?

By default is 50, and I would like to increase it. I saw there is an option in Document Properties, but I can not access also.

Any idea?

Thanks,

Rafa

@nathanletwory - is this something you can help with?

1 Like

These settings are document properties, you can set them as follows:

import scriptcontext as sc

d = sc.doc.RenderSettings.UserDictionary

d["UseDocumentSamples"] = True
d["Samples"] = 42

GUI doesn’t always update automatically, but closing the dialog and rendering panel, then reopening them will show the updated settings.

2 Likes