Python-Ogre Version 0.7 Available

andy

03-01-2007 15:33:12

We are pleased to announce release 0.7 of Python-Ogre, python bindings for Ogre (and other libraries) based upon Py++

This release further enhances support for the base OGRE library, CEGUI (Graphical user interface), OIS (input library), OgreRefApp (ODE Physics) and OgreNewt (Newton Physics). Look here for more specific on this release

As with previous releases we've included are all the necessary windows binaries based upon the latest CVS verison of Ogre. Full source is available via SVN access for Linux users and Windows users wanting to build from source

Downloads can be found here

Note that it's still early in the development cycle for Python-Ogre, so please be kind :) when reporting bugs and we'll do our best to get them resolved as soon as possible.

Please copy the python-ogre-developers@googlegroups.com with any problems or comments.

Thanks

The Python-Ogre Development Team
(Lakin, Roman, Andy)

Game_Ender

03-01-2007 16:19:32

Just so all the SVN users can get it here: where are the exact revisions of Py++ and Pygccxml to use?

roman.yakovenko

03-01-2007 18:34:38

revisions:
pygccxml - 838
Py++ - 828

jintal

03-01-2007 20:31:43

rawr. no python 2.4 version.:cry:

btw, fixed some typo and grammatical errors in your v0.7 info wiki page. :lol:

andy

03-01-2007 23:29:17

Python 2.4 version compiling as we speak - give me 24 hours....

Thanks for fixing the typos - it was getting very late when I did the intial edits :D

griminventions

04-01-2007 00:28:56

Kudos and bravo! Keep up the great work! :)

machinimist

04-01-2007 07:00:20

yes, thank you! :) ...keep up the great work! hopefully this project won't come to a halt like its predecessors.

andy

04-01-2007 09:39:33

Support for Python 2.4 is now available :D

Check out the downloads section of the [b]Python-Ogre[/b] site......

jintal

04-01-2007 17:39:12

the windows zip package of v0.7 for python 2.4 was indeed corrupt according to winrar (i used a download manager). the 7zip format was perfect though.

thanks so much andy! this is such a great xmas gift! :lol: :lol:

EDIT:
just some observations. :D
- pydoc is still incomplete, c++ function names aren't displayed yet. no hurry
<get> = <unnamed Boost.Python function>(...)

- great bezier and ogreNewt demos!

andy

04-01-2007 22:11:38

Can you expand on the pydoc problem as I'm not sure I understand it...

Thanks

Andy

andy

05-01-2007 04:34:54

Also the ZIP files have been replaced with more 'XP' friendly ones...

However I recommend that you install a copy of 7-zip and use that version if possible...

Martins1

05-01-2007 17:34:07

Hello Andy,

great work you are doing!
I am planning to use Python-Ogre while embedding Python into my C++ app.
Could you please put somewhere OgreMain.lib, so I do not
have to build the whole Python-Ogre (I will youse Ogre CVS version
includes + your OgreMain.lib and OgreMain.dll with MSVC)

Thanks!
:)

jintal

05-01-2007 18:27:42

Can you expand on the pydoc problem as I'm not sure I understand it...

Thanks

Andy


sample help() output:
polygonModeOverrideable
Python-Ogre Property: polygonModeOverrideable
Getter and Setter property wrapping 'getPolygonModeOverrideable' and 'setPolygonModeOverrideable'

<get> = <unnamed Boost.Python function>(...)

<set> = <unnamed Boost.Python function>(...)

jintal

05-01-2007 19:06:50

btw, can't get these pieces of codes to work:

self.root = ogre.Root('plugins.cfg')
for renderSystems in self.root.getAvailableRenderers():
pass

gives out this error:
TypeError: No to_python (by-value) converter found for C++ type: class Ogre::RenderSystem *

this one:
self.root = ogre.Root('plugins.cfg')
self.root.getAvailableRenderers().count()

gives out:
Boost.Python.ArgumentError: Python argument types in
RenderSystemList.count(RenderSystemList) did not match C++ signature:
count(class std::vector<class Ogre::RenderSystem *,class std::allocator<class Ogre::RenderSystem *> > {lvalue}, class Ogre::RenderSystem *)

andy

06-01-2007 00:18:49


sample help() output:
polygonModeOverrideable
Python-Ogre Property: polygonModeOverrideable
Getter and Setter property wrapping 'getPolygonModeOverrideable' and 'setPolygonModeOverrideable'
<get> = <unnamed Boost.Python function>(...)
<set> = <unnamed Boost.Python function>(...)


Is this with Python 2.4?

I don't see this behaviour in 2.5, not with the web interface, or if I do a help("Ogre._ogre_.Renderable") -- I suspect it's a pydoc 'bug' that's fixed in Python 2.5

BTW, the C++ function calls are those listed in the description string ('getPolygonModeOverrideable' and 'setPolygonModeOverrideable')

Cheers
Andy

andy

06-01-2007 00:26:20

Could you please put somewhere OgreMain.lib, so I do not
have to build the whole Python-Ogre (I will youse Ogre CVS version
includes + your OgreMain.lib and OgreMain.dll with MSVC)

This is a good idea....

Perhaps I'll setup a 'snapshot' area on the Python-Ogre site and include the lib's as part of this..

Give me a few days or so.. :)

andy

06-01-2007 00:38:20



self.root = ogre.Root('plugins.cfg')
for renderSystems in self.root.getAvailableRenderers():
pass

gives out this error:
TypeError: No to_python (by-value) converter found for C++ type: class Ogre::RenderSystem *


It's a bug :oops: and I'll get it fixed (I need to write a demo to use this, as the demos serve as the QA tests)

In the mean time do as per the demos and sampleframework and popup the Ogre dialog box asking the user to select the Renderer...

Cheers
Andy

jintal

07-01-2007 09:32:33

In the mean time do as per the demos and sampleframework and popup the Ogre dialog box asking the user to select the Renderer...

will do

thanks :wink:

jintal

08-01-2007 10:41:11

i'm having errors in the file BasicFrameListener.py in the ogreNewt demos directory.

(starting at line 22)
s = OgreNewt.Debugger.getSingleton()
s.showLines( self.World )


when i run an ogrenewt demo, f3 should draw the whole newton world in the screen. it returns the error at the s.showLines( self.World ) line:

RuntimeError: unidentifiable C++ exception

any ideas?

andy

08-01-2007 13:23:41

The OgreNewt debugger is broken (and I had almost removed all the 'F3' handling from the demo's :) )

It's on the ticket list to get fixed - it actually works if you leave it on, but doesn't clean up at app exit :(

jintal

08-01-2007 13:43:14

yea but i tried to turn on the debugging lines. is there any way i can turn on those lines? :D

Game_Ender

09-01-2007 06:23:56

yea but i tried to turn on the debugging lines. is there any way i can turn on those lines? :D

Yes the lines work fine, its just that debugger doesn't shut down cleanly. Which is par for course on a beta/alpha project.

Here is what to do:

// First Create the debugger
OgreNewt.Debugger.getSingleton().init(self.sceneManager)

// Every frame you want to show debugging lines call
OgreNewt.Debugger.getSingleton().showLines(self.ogreNewtWorld)

// When you want to make the lines go away call
OgreNewt.Debugger.getSingleton().hideLines()

// Before you del the SceneManager or the OgreNewt.World call this
OgreNewt.Debugger.getSingleton().deInit()

andy

09-01-2007 15:29:29

A quick Python-Ogre development Update.

1. The root.getAvailableRenders() bug is fixed and 'tested' in a new demo (Demo_RenderCreate). This demo also shows how to set the window title, and could serve as a test environment for switching from fullscreen to windowed and back (if this is really possible?)..

2. Demo01_the Basics.py in the OgreNewt section, showing how to enable and disable the Debugger

Anyone building from source can get the enhancements from the SVN

For those using the Windows binary release I've made a snapshot available from the downloads page on the Python-ogre site - however note that while I'm happy using the snapshot, and there are specific improvments, it hasn't had much in the way of testing :)

I would only recommend those people who have specific problems with Version 0.70 to use the snapshots release

jintal

09-01-2007 17:19:46

thanks game_ender, the lines show up fine now! :D

sorry for the noobish Qs :oops: :oops: , i've just recently moved to OgreNewt from pyODE

saluk

17-01-2007 23:02:28

This is probably related to the configuation bug described above, I can't get the config settins back out of the configuration dialog even if I use the default one.

My code:

opt = self.root.getRenderSystem().getConfigOptions()
print opt.keys()
#['Colour Depth', 'Display Frequency', 'FSAA', 'Full Screen', 'RTT Preferred Mode', 'VSync', 'Video Mode']
print dir(opt)
print dir(opt["Video Mode"])


error:

print dir(opt["Video Mode"])
TypeError: No to_python (by-value) converter found for C++ type: struct Ogre::_ConfigOption
Exception exceptions.AttributeError: 'gui' in <bound method TutorialApplication.__del__ of <__main__.TutorialApplication object at 0x019C6E30>> ignored


Hope this can be fixed, I've managed to embed in pygame but I cant tell pygame what size to make the window!

andy

17-01-2007 23:13:49

Indeed you are seeing a related bug that has been fixed (I'm happy to say)

I'll post a new snapshot tomorrow which you can use for testing.

Cheers
Andy

saluk

18-01-2007 01:07:00

Sounds awesome. If possible, could you please post a snapshot for python2.4 as well? I'm stuck with 2.4 for a while :(

andy

18-01-2007 01:09:38

Sorry, only python 2.5 snapshots...

Creating Python 2.4 images requires a complete recompile of everything (I can't get away with a relink, it's all or nothing) which takes a while..

I will probably put out a 0.8 release in the next week or so anyway so this should help..

Cheers
Andy

saluk

18-01-2007 02:45:15

Alright, that's understandable. I have a workaround that parses the config file, so it's not a big deal at this point.

Thanks for all of your hard work.

BerndWill

19-01-2007 18:45:20

I finally got Pyogre running now (thanks to the fabulous python-forum people). Though I managed to partially get some 1.05 pyogre to run, now I see the complete functionality of pyogre and it rocks like hell !!

Thank you very very much !!!!

Please keep up with it !!!!!!!!!!!!!!!


Regards
Bernd

andy

19-01-2007 22:40:14

I presume you mean you got "Python-Ogre" working?? :)

If so, glad to hear it :)

saluk

20-01-2007 00:00:43

I am having a problem with AxisAlignedBox.allCorners.

It should be returning a list but it appears to only be returning a single Vector3 object. I have tried allCorners, AllCorners, and getAllCorners, they all return the same.

Once again, I have already worked around it in my code, and my solution is probably better than the original. I was trying to implement this:
http://www.ogre3d.org/wiki/index.php/ObjectTextDisplay

But instead of iterating through the corners and manually doing a bunch of work, I just put the boundingbox through the camera transform and get the min and max values from there :)

But this could mean that there are other places that return pointers which ought to be converted into a list but aren't.

andy

20-01-2007 01:30:35

Could you send me (via email etc) a simple test program and I'll look into it as indeed this seems to be a bug..

Cheers
Andy

saluk

20-01-2007 03:06:01


import os,sys
if sys.platform == 'win32':
os.environ['PATH'] += ';' + __file__[0]

import Ogre as ogre
import SampleFramework
import math

def CV(*args):
return ogre.ColourValue(*args)
def V(*args):
if len(args)==2:
return ogre.Vector2(*args)
if len(args)==3:
return ogre.Vector3(*args)
if len(args)==4:
return ogre.Vector4(*args)
def DEG(*args):
return ogre.Degree(*args)
def RAD(*args):
return ogre.Radian(*args)
#print dir(RAD(1.5))
print ogre.Radian(1.5).valueDegrees
print ogre.Degree(1.5).valueRadians

class TutorialApplication(SampleFramework.Application):
def _createScene(self):
sm = self.sceneManager
sm.ambientLight = CV(1,1,1)
ent1 = sm.createEntity("Robot","robot.mesh")
node1 = sm.rootSceneNode.createChildSceneNode("RobotNode")
node1.attachObject(ent1)
ent2 = sm.createEntity("Robot2",'robot.mesh')
node2 = node1.createChildSceneNode("Robot2Node",V(50,0,0))
node2.attachObject(ent2)
node1.setScale = V(2,2,2)
node2.setScale = V(.5,.5,.5)
node2.roll(math.pi/2.0)
bb = ent1.getBoundingBox()
print "should be 8 corners!"
print bb.allCorners #Prints ogre.Vector3, instead of a list of them

if __name__ == '__main__':
ta = TutorialApplication()
ta.go()


Just one of the tutorials coded to show output of allCorners.

chucklyfun

20-01-2007 22:03:12

Is there support for CombinedListener in python-ogre yet?
with this code:

#------------------------------------------------------------------------------
# FrameListener
#------------------------------------------------------------------------------
class FrameListener(Ogre.CombinedListener):

I get this error:

Traceback (most recent call last):
File "D:\Python25\Python-Ogre-0.7\golem-0.5.0-alpha\app.py", line 100, in <module>
class FrameListener(Ogre.CombinedListener):
AttributeError: 'module' object has no attribute 'CombinedListener'

scriptkid

21-01-2007 10:53:34

Hi,

[EDIT] I just updates to 0.7 myself, and get it too. I'll see what i can find.[/EDIT]

Have you done a correct import? Maybe it's Ogre with no capital 'O'? Just some guesses..

Good luck.

andy

23-01-2007 11:26:27

A quick update and answer to some previous questions..

1. The getCorners etc functions that return arrays of Vector3's have been fixed
2. All Ogre.Colourvalues and Vector3's can be passed as tuples. This will be extended to take lists and to support Matrix's over the next few days.
3. CombinedListener is a "PyOgre only" workaround and is not required in Python-Ogre. If you need help converting existing code email it through and we'll help.

All updates are in the SVN, and I will build a new Windows binary release next weekend (look for a Python 2.5 snapshot tomorrow)

Also I'm hoping we will get OgreOde as part of the next release along (and perhaps OgreAL??)

Cheers
Andy

saluk

23-01-2007 19:23:43

Awesome, keep up the good work!

jintal

25-01-2007 16:44:47

@ chucklyfun

use this instead of the combined listener

import Ogre as ogre

class MyFrameListener ( ogre.FrameListener ):
def __init__ ( self ):
ogre.FrameListener.__init__( self )

def frameStarted ( self, frameEvent ):
return True

def frameEnded ( self, frameEvent ):
return True


that's the only thing you need to do to convert your code to python-ogre :wink:

@ andy

i remembered why i stuck to python 2.4. there're some modules i use that don't have 2.5 support. i think MySQLdb is one of them :wink: so please, do release a 2.4 version :D

jintal

25-01-2007 17:45:11

why include the OgreODE when there's an OgreNewt already?

don't hurt me! :lol: :lol:

keep up the superb work!

andy

25-01-2007 22:58:40

It's all about choice, choice and more choice.. :)

Seriously though, I've had a number of people that already have ODE code and want to convert across to Ogre/Python-Ogre - so this will make it easier....

"And" the underlying goal here is to further develop Py++ by wrapping a wide range of classes (and having Roman tweak things as we go along). For example the next release will have OgreAL sound support, and yet I'll probably add FMOD support as well in the future.

By using Py++ to create the Python wrappers there is very little overhead in maintaining each wrapper so the more the merrier...

Mishra

26-01-2007 03:56:30

recently I have been writing some code with python-Ogre

and found some kind of strange issue:

the setDebugText method of the RenderTarget class (and classes that inherit from it, like RenderWindow),

isn't wrapped. Perhaps i'm wrong, could anyone explain me :?:

( if my memory doesn't fail me, i had a problem like this before, with a missing method, but that was because of inheritance, i believe, and i had to cast the class to another type)

andy

26-01-2007 05:14:44

setDebugText has been removed from Ogre for the Eihort/1.4 release..

I do show a way to implement this functionality with Python-Ogre in Demo_Beizer.py..

You might also like to check out http://www.ogre3d.org/wiki/index.php?ti ... #ChangeLog for additional changes to Ogre

Cheers

Andy

jintal

26-01-2007 07:34:03

It's all about choice, choice and more choice.. :)

Yea you're right. Superb point

Seriously though, I've had a number of people that already have ODE code and want to convert across to Ogre/Python-Ogre - so this will make it easier....

Hehe, i was one of those people. but decided to give OgreNewt a try. I'd recommend people to switch over to Newt because the material system is just so powerful. I can say that i've dumped over 100+ lines of code and have a cleaner structure because of the flexibility of newt :lol:

"And" the underlying goal here is to further develop Py++ by wrapping a wide range of classes (and having Roman tweak things as we go along). For example the next release will have OgreAL sound support, and yet I'll probably add FMOD support as well in the future.

i think for more serious applications, FMOD is the way to go. also found out that there's an FMOD dll in my Gunz online directory. now i'm even more attracted to it.

By using Py++ to create the Python wrappers there is very little overhead in maintaining each wrapper so the more the merrier...

:lol:

saluk

26-01-2007 17:59:34

If you want to sell your game though fmod can be a bit pricey for a begining developer. Also, openal is more widely accepted in the linux community. Same with newton vs ode, newton is also not open source so not as easy to work on linux.

This is not to say that open source is better, but there are advantages and disadvantages to everything.

Srekel

31-01-2007 11:43:36

Concerning FMOD vs OpenAL, I tried the OpenAL binding first when we made A Violent World, but for some reason it didn't work too well. PySonic (FMOD) worked perfectly from the start ( I think ).

But there's absolutely a good idea to use OpenAL for a bunch of reasons, so if it would work that'd be great.

saluk

31-01-2007 17:29:21

Yeah, fmod is a really great library. I have been using the blender game engine since it first came out, until I recently switched to ogre. Back when blender was non-free, they used fmod, and you could attach sounds to objects for easy 3d sound, it did automatic doppler effects, etc. It was really great. When they went to open source it lost a lot fo that functionality. Haven't tried sound recently, they might have gotten it up to its former glory. But fmod is so easy to work with and just works.

futnuh

02-02-2007 06:00:27

Do you think python-ogre is stable enough for production work? We've got an interactive kids exhibit due for delivery in April. I'm wondering if changing over to python-ogre from pyogre is a smart move ...

andy

02-02-2007 15:36:49

Do you think python-ogre is stable enough for production work
I would have to say absolutely - but then I'm biased :D

However, being serious - we haven't had any instability issues with Python-Ogre. All the 'problems' so far have been to do with us completing the 'Python' wrapper scripts that create the C++ wrapper code, and each one that's been reported to date has had a work around, and is currently fixed in the SVN.

We did initally focus on the Windows platform, however we recently changed our build system and the base Ogre+OIS+CEGUI modules are running nicely under Linux :)

I'd suggest you start with Python-Ogre 0.8 which will (should) be released this Sunday. And due to the active nature of the Python-Ogre project you will get support and fixes for anything you happen to find.

Cheers
Andy

futnuh

03-02-2007 05:40:28

The pre-built Windows bindings work nicely. Is there a good description available of building from source? If not, perhaps we could start a new sticky thread or wiki page ...

andy

03-02-2007 08:24:45

Check out http://python-ogre.python-hosting.com/wiki/Compiling -- note that this is a good start, and I will further update it once I get a 0.8 release out..

And for help use the Python-Ogre mailing list..

Compiling on Windows is very clean, and Linux is also pretty good (there are a number of active users on the mailing list that have been helping out here).

Cheers
Andy

saluk

03-02-2007 09:30:19

I switched my game over to python-ogre a month ago, and have had no problems with the binding or the engine at all; and my game is an incredibly complex unstable monster :) I'm confident that python-ogre will take whatever craziness I dish out. The only thing that's bugged me so far has been the rotation difference between blender (what I used before) and ogre, I had to change the default transforms in ogre to fit. And that's really an ogre issue.

It's certainly better than the last version of PyOgre I tried, but that was years ago so the same might be said about the current version of PyOgre.

There really isn't anything to complain about with the binding, except for the build issues which are quickly being resolved it seems.

There really is almost no difference between python-ogre and ogre itself.