Integration of some Blender's GUI widgets inside a game engine application

Hi everybody,

Is it possible to integrate some blender’s GUI widgets inside a game engine application (during the program execution, not inside the blender’s interface) ? For example, during the execution, I would like to have my 3D view at right and a toolbar at left. I have found some external librairies like “bgui” but I would like to add some complex widgets already developed the blender GUI (tree view, timeline…).

In other words, is it possible to split the game engine main window to have a 3d view and a 2d render ? Or I must simulate 2d GUI with 3d planes, and create this user interface “by hand” ?


Can’t be done at the moment. In the future, the BGE will run as a modal operator, which means that you can continue to use Blender widgets while the BGE is running. But they won’t be inside the BGE window, and they wouldn’t affect game state (meshes etc. are converted from Blender upon BGE startup).

Hi Sjoerd, and thank you for your reply,

but, to be sure, I don’t want to be able to control the game engine application process with the blender GUI : I would like to know if I can integrate some blender’s widgets inside my game engine application, to be able to design a full user interface. For example, can I add a simple button (from the blender toolkit) in my game engine to do actions during the execution, or I’m obliged to simulate this button with planes and textures ?

What I meant is: if you modify a mesh object in Blender while the BGE is running, it won’t affect the object inside the BGE. The BGE keeps its own representation of objects. You would have to connect your Blender widget to some code that does “import bge” etc.

And you can’t embed Blender widgets inside the BGE window.

In any case, all of this is hypothetical: the BGE isn’t yet a modal operator, so starting the BGE freezes all Blender widgets until the BGE is finished.

To get things working right now, use BGUI.

Ok, I understand.

I think it could be interesting to add a simple window manager in the BGE module (for example bge.gui) and to wrap existing widgets (developed c++ ?) in Python to be able to integrate them inside the BGE window.

This can able us to develop not only games but also simulation applications or someting else, which require some user inputs and advanced GUI.

Perhaps, one day…

Thanks again for your reply.

One day, perhaps… if there is demand for it.
If you really need it, you will have to use something else than the BGE.

There are specialized game engine GUIs (e.g. CEGUI or LibRocket), which you can use e.g. with Ogre3D or Panda3D.
It is also possible to use OpenGL commands together with some general-purpose GUI frameworks (Qt or GTK), but this is not easy to set up.