bharling
30-06-2006 13:19:08
Hi, greetz to all in the forum
Been looking for a way to use the ogre scene XML files with pyOgre, couldn't find a way to do it, so I sat down and wrote a parser in python. Now, I'm no python expert, but it does seem to be doing things right, however, it seems to have a problem instantiating the ogre sceneManager. Could someone with more pyogre skill than me have a look and see what I'm doing wrong?
Fixed now, and updated, the module below will allow you to open scene.xml files created by blender, albeit not rotated correctly.
http://www.zerofilter.com/pyogre/pyOgreDotSceneLoader.zip
if you want to use this script, you'll need the pyXML module from:
http://pyxml.sourceforge.net/
the error i GOT was (at the bottom of a long traceback):
Solution kindly pointed out to me was that the xml parser was feeding unicode into the rest of the script, judicious use of str() float() sorts that out.

Been looking for a way to use the ogre scene XML files with pyOgre, couldn't find a way to do it, so I sat down and wrote a parser in python. Now, I'm no python expert, but it does seem to be doing things right, however, it seems to have a problem instantiating the ogre sceneManager. Could someone with more pyogre skill than me have a look and see what I'm doing wrong?
Fixed now, and updated, the module below will allow you to open scene.xml files created by blender, albeit not rotated correctly.
http://www.zerofilter.com/pyogre/pyOgreDotSceneLoader.zip
if you want to use this script, you'll need the pyXML module from:
http://pyxml.sourceforge.net/
the error i GOT was (at the bottom of a long traceback):
File "C:\Documents and Settings\.....\Desktop\myPyOgreProject\SceneLoader.py", line 143, in createOgreNode
node = self.sceneManager.rootSceneNode.createChildSceneNode(name)
File "C:\Python24\Lib\site-packages\pyogre\ogre.py", line 15213, in createChildSceneNode
return _ogre.SceneNode_createChildSceneNode(*args)
NotImplementedError: No matching function for overloaded 'SceneNode_createChildSceneNode'
Solution kindly pointed out to me was that the xml parser was feeding unicode into the rest of the script, judicious use of str() float() sorts that out.