PyOgre Tutorial 3 Issue


30-05-2007 11:59:43


I am having trouble running the 3rd tutorial with Python-Ogre 1.0 RC1. The trouble seems to be with this line:

self.sceneManager = self.root.getSceneManager(ogre.ST_EXTERIOR_CLOSE)

This is the traceback:

Traceback (most recent call last):
File "C:\PythonOgre\demos\ogre\", line 16, in <module>
File "C:\Apps\Python2.5\Lib\site-packages\ogre\renderer\OGRE\", line 60, in go
if not self._setUp():
File "C:\Apps\Python2.5\Lib\site-packages\ogre\renderer\OGRE\", line 77, in _setUp
File "C:\PythonOgre\demos\ogre\", line 9, in _chooseSceneManager
self.sceneManager = self.root.getSceneManager(ogre.ST_EXTERIOR_CLOSE)
ArgumentError: Python argument types in
Root.getSceneManager(Root, SceneType)
did not match C++ signature:
getSceneManager(class Ogre::Root {lvalue}, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > instanceName)

Do you have any idea what I need to do to fix this?


30-05-2007 13:56:27

you need to give the sceneManager a name like this (also use 'create' rather than 'get'):

self.sceneManager = self.root.createSceneManager(ogre.ST_EXTERIOR_CLOSE, "testSM")

unfortunately the tutorials are out-dated.