Accessing render cycles count with a script

Im working on a Render automation, and one thing I cannot seem to find is how I can access the cycle count (Samples Count) from within the code. Has anyone successfully done this?

Do you want to set this to one of these predefined counts?

yes!

You can change them by setting RenderSettings.AntialiasLevel Property.

In Python you’d do something like:

#! python3

import scriptcontext as sc
import Rhino

print(sc.doc.RenderSettings.AntialiasLevel)
sc.doc.RenderSettings.AntialiasLevel = Rhino.AntialiasLevel.Good
print(sc.doc.RenderSettings.AntialiasLevel)
1 Like

Thank you so much Nathan!