Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4159

GetPageViews or get RhinoView from file in the RhinoCommon API

$
0
0

Hello

I´ve been trying to use the Rhino.Display.ViewCapture.CaptureToBitmap() from the RhinoCommon API but it is returning None:

import Rhino

rhino_file_viewtable = rhino_file_instance.Views
viewportinfo = rhino_file_viewtable.FindName(“Top”)

rhinoviewport = Rhino.Display.RhinoViewport(viewportinfo)
viewcapturesettings = Rhino.Display.ViewCaptureSettings(rhinoviewport, 400, dpi)
bmp = Rhino.Display.ViewCapture.CaptureToBitmap(viewcapturesettings)
print (bmp) # RETURNS None

I suspect it is due to the rhinoviewport not being a RhinoView, which is returned by the GetPageViews () when using scriptcontext.

Any ideias on how to use the GetPageViews in RhinoCommon API (returning a RhinoView?) or alternativelly, getting a RhinoView from an existing file?

Thanks

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4159

Latest Images

Trending Articles



Latest Images