Current Status of PyOgre GUIs?

Kris Schnee

28-04-2006 12:12:20

Hello. I'm getting back into 3D after leaving it for a while, and have not kept up with the status of PyOGRE's attempts at getting a proper GUI such as CEGUI working. I remember I wrote a hacked little text interface, but it wasn't good-looking or suitable for what I wanted to do.

I also looked recently at the CrystalSpace engine, and am trying to get that set up to use with Python, but apparently there's an extensive hazing process just to get the thing installed. I do see that there are models in its "CS XML" format for Bronze Age tools and other items, though; is there an easy way to convert those to an OGRE-compatible format?

Anyway, what's the status of GUIs in PyOGRE? Can I get buttons, text fields etc. going?


28-04-2006 13:37:18

Hi Kris, you haven't been on these forums for a while now. I was beginning to wonder what happened to you.

I haven't actually tried using CEGUI, and I'm not sure of its status. I do know that some people have been able to connect PyOgre and WxPython to create a user interface:

Somebody else has done work to get a .NET GUI to play nice with PyOgre:

I'm not sure if that's the kind of thing you are going for, though.

I have played around with CrystalSpace in years past, including its python bindings. PyOgre has fit my niche better, so I haven't really done anything with CS lately. If you want to convert CS XML to Ogre XML, you might look to see if there is a way to convert the CS models to a common format, like Blender or 3DS. From there you could export them as OGRE models. If you are really ambitious, you could use Python's XML stuff to write a CSXML to OgreXML converter...


28-04-2006 13:48:03

Kris Schnee wrote:

Anyway, what's the status of GUIs in PyOGRE? Can I get buttons, text fields etc. going?

Yes, pyCegui appears pretty stable and you should you can pretty much use all the controls available to Cegui with event handling implemented. Take a look at the cegui's demos and the tools MeshViever shipped with pyOgre.

A few things to note:

  1. 1) you have to keep a reference to any events you subscribe / items you add to listboxes etc
    2) there is no global event handling for controls, e.g. creating an event handler to handle all button event clicks
    3) You still need pyOgre to use pyCegui, it needs to be updated so that it can be be used with Ogre and OpenGL separately.
    4) There are some updates required if compiling and using swig1.3.29
    5) A few event names may not be defined when subscribing events depending on the version of CEGUI you are using. Short term you can get around this by supplying:
    eg addButton.subscribeEvent(addButton.EventClicked

    6) There is a problem on Linux, which means we have to either static link against and to use the different looks:
    export LD_PRELOAD=/usr/local/lib/
    export LD_PRELOAD=/usr/local/lib/

    7) The FalgardBase stuff hasn't really been fully implemented so your mileage on this may vary.

    2,3,4,5 have already been done and should be in the next realease.

Kris Schnee

05-05-2006 11:01:29

OK, I'll take a fresh look, probably after exams end next week.
My whole project's in flux, as is an unrelated game project that's just a mostly-finished text-based demo right now. I don't know what engine to use between Pygame and PyOgre, given that I don't have 3D modeling skills or even 2D art skills and don't want to spend forever building the display part of the game.