PyOgre Tutorial 3 Issue

Silvo

30-05-2007 11:59:43

G'day!

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\tesy.py", line 16, in <module>
ta.go()
File "C:\Apps\Python2.5\Lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 60, in go
if not self._setUp():
File "C:\Apps\Python2.5\Lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 77, in _setUp
self._chooseSceneManager()
File "C:\PythonOgre\demos\ogre\tesy.py", 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?

bharling

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.