Is there any way to use the scriptcontext externally from Rhino/grasshopper?
I am scripting this in pycharm using the RhinoCommon API - the rhino_file_instance is an instance of a opened rhino file (opened via Rhino.FileIO.File3dm.Read(str(rhino_file_path)). scriptcontext can not be used as an external API, correct?
I’ll assume you are using Rhino.Inside CPython, per this example:
In order to capture a view to a bitmap, a Rhino view must be visible. View capturing uses OpenGL. Thus an OpenGL view (e.g. a Rhino view) must be visible and operational.
So yes, you can do a view capture from CPython as long a Rhino is visible.
Is there any way to get any view from a rhino file instance opened via Rhino.Inside CPython? ( Rhino.Display.RhinoView or Rhino.Display.RhinoPageView). I suppose only these two kind of views work to export bitmaps or pdfs right?
I have tried to make it work via the viewportinfo:
Capturing views using Rhino.Inside CPython is currently not going to work. This is something we are hoping to implement in the near future.
Rhino.Inside CPython currently only supports Rhino running in what we call a “headless mode”. This means that non user interface is available. It actually is possible to still use OpenGL to create captures without user interface, but the core Rhino display code needs some restructuring to be able to do this.
Is there any alternative I could try? Do you think it can work by creating this script inside rhinoceros and running it from rhinocommon or any other alternative?