Python Headless

Is there any way to load rhino but not in headless mode? So to force the full UI from CPython?

Rhino.RhinoApp.IsRunningHeadless

This return True confirming it is running in headless mode, I would like to run it with a full UI?

1 Like

Hoi Etienne, could you provide a bit more information on what you are trying to do? It sounds like you would just want to run Rhino and then run a program from within that?

@brian?

@stevebaer knows how this works; I think he’s on vacation for a while.

On the contrary, I am trying to control Rhino from CPython as Rhino.Inside allows us to do. However, I do want to be able to visualize the geometry by visualizing the full Rhino GUI.

Compare it to the current method of using the Rhino COM interface in VB.

I think you should be able to give some options, let me see if I can find the info on that.

edit: here some info that I haven’t tried, but you could try editing this line so that RhinoCore takes two parameters. The first one is a list of strings that are options to Rhino (command-line start options), the second the value 0 (meaning normal window).

As said, untested. As said by others @stevebaer probably would be able to tell you more.

I don’t know how to do this, but I have an idea that may work. I would think that we would use the COM technique to load Rhino first and then call into Rhino from python. The issue is that for user interface to be displayed we need Rhino’s main UI thread active and constantly responding to Windows messages.

I’ve tried to use the COM interface technique before (Rhino 5) to load the “Rhino.Application” interface but with no luck in CPython. Although my programming skills are not that good.

Any advances on that question Etienne ?
I’ve the same desire for a full UI launch, I’m trying to show a simple viewport for now.

Not an expert on Rhinocommon,
Antoine