Hi,
The script below use ViewCapture.CaptureToBitmap(settings)
to save bitmap from viewport.
However the TransparentBackground
property is at ViewCapture Class.
I couldn’t find the Transparent property in ViewCaptureSettings Class.
Hope if there’s any suggestion.
def Capture():
selectview = Rhino.RhinoDoc.ActiveDoc.Views.Find(i, False)
size = System.Drawing.Size(int(width*fector), int(height*fector))
#viewcap = rd.ViewCapture()
#viewcap.TransparentBackground = True
settings = rd.ViewCaptureSettings(selectview, size, 300) #view, size, dpi
settings.SetWindowRect(pt0, pt2)
settings.RasterMode = True
settings.DrawGrid = False
settings.DrawAxis = False
settings.DrawWallpaper = False
bitmap = rd.ViewCapture.CaptureToBitmap(settings)
bitmap.Save(path+filename+".png")
1 post - 1 participant