[Bf-committers] Python/Gui/GameEngine help?

Willian Padovani Germano bf-committers@blender.org
Wed, 22 Oct 2003 22:30:24 -0200

Hi Martin,

> I want to add extra functionality to the GameEngine, similar to the
> Blender.Draw module.
> Can someone point me in the right direction?

We'll soon make some internal changes to Blender Python that may improve and
maybe let Game Engine scripts access the existing bpython modules.  This is
for after 2.30 and the "proper integration of scripts in Blender".

> Things I am trying to do:
> Create a GUI overlay without using an OverlayScene which can contain
> buttons.  The buttons should have icons not text.  Also I want text entry
> box, for a chat interface.
> Will it be easy (??) to allow the Blender.Draw module to be accessible
> the GamePlayer and also to draw in the main window, not in the Script
> which doesn't exist in the GamePlayer.  The canvas for this should be 2D
> unaffected by lighting.

I already made some experiments with popup windows from bpython scripts and
the drawing part works nicely.  The Blender ui is being improved right now,
as you probably know, and persistent popup windows (what was missing for
using them from scripts) were mentioned as part of the wanted additions.
About drawing to the 3d window, that is possible with simple improvements in
the Draw code -- already tried, too.

> Is the Blender.Draw module likely to do what I want assuming I can get the
> GamePlayer to access it?  (ie, run an event loop, picking up events,
> dispatching them to my event handler, doing mouseover highlighting of
> buttons, calling button call backs and so on.)

There are other people interested in things like this.  We'll need to test
to be sure about what can be done.

BTW: these topics are more at home at the bpython mailing list:

(its archives may also have something of interest regarding the game

Willian, wgermano@ig.com.br