Code Snippets - Minimal Application Incomplete


20-07-2008 19:30:25

Alright im pretty new to python-ogre coming from panda3D.
I stumbled upon the Minimal application which has the basic concepts of basic tutorial 5 and 6. When running it i found this problem with it. It was missing this method:

def convertButton(self,oisID):
if oisID == OIS.MB_Left:
return CEGUI.LeftButton
elif oisID == OIS.MB_Right:
return CEGUI.RightButton
elif oisID == OIS.MB_Middle:
return CEGUI.MiddleButton
return CEGUI.LeftButton

and proper calls to it in the following (missing self. )

def mousePressed(self, evt, id):
# Handle any CEGUI mouseButton events
return True

def mouseReleased(self, evt, id):
# Handle any CEGUI mouseButton events
return True

This fixed the missing method problem but when running it, it just freezes when any button is pressed. Then i have to force quit.

My first guess is this code is outdated but its stamped "Alex de Landgraaf, 2008".
I am using python25 and python-ogre 1.1 windows


20-07-2008 22:27:26

Hello Evan

Welcome to python-ogre. It is a great graphical engine but tools are limited. The code snips, basic apps, sample code are usually unmaintained with too many bugs to be useful so I started working on a new implementation called:

The main object here is to provide tools to support python-ogre using wxWidget. wxWidget gives a windows look to the python-ogre. The framework also provides a way to create create applications without it.
The whole approach is minimal and modular in concept.

An overview can be here

The main forum thread for the wxOgre project is here:

You can download the code from there (rev15b). There are a few demos that can be generated.

rev15 with demos

You'll need to wxWidgets and place the code in the demos folder where the rest of the code is. I personally used the name wxOgre for my folder.

I'll be happy to help you setup your environment and explain how things work. Hopefully after evaluation, you will find that this can useful for you.

As far as your issue is concern, I will take a look at it and post a reply later.



21-07-2008 00:41:07


I had a look at the code, it seems the problem is coming from the cleanup function. I just commented it out and I let python clean it up.

I added an ogre head. Here is the updated code.



21-07-2008 01:06:00

Thanks Scorpio :D

Community support for Ogre is amazing.


23-07-2008 16:28:15

Sorry for missing that function, thanks for fixing it skorpio!