Returns or sets the render resolution. Resolution is measured in pixels. See Rhino's DocumentProperties command (Rhino Render window) for details. Note, if the render resolution is set to "viewport", then the size of the active viewt is returned.
rhinoscriptsyntax.RenderResolution (resolution=None)
rhinoscript.document.RenderResolution (resolution=None)
resolution |
Optional. Tuple or List. Two numbers identifying the resolution width and height in pixels. |
Tuple |
If resolution is not specified, two numbers identifying the current resolution width and height in pixels if successful. |
Tuple |
If resolution is specified, two numbers identifying the previous resolution width and height in pixels if successful. |
import rhinoscriptsyntax as rs
sizex, sizey = rs.Viewsize()
resolution = sizex/2 , sizey/2
rs.RenderResolution( resolution )