problem whith the begginer tutorial:(pyogre)

pocho

18-10-2006 21:23:12

hello I am new in this forum and the use of pyogre.
now I am reading the first tutorial
but I have a problem with the script.
watch this, where this the error? and as I can correct it?



from pyogre import ogre
import SampleFramework


class TutorialApplication(SampleFramework.Application):
def _createScene(self):

pass
sceneManager = self.sceneManager
sceneManager.ambientLight = ogre.ColourValue(1, 1, 1)
ent1 = sceneManager.createEntity("Robot", "robot.mesh")
node1 = sceneManager.rootSceneNode.createChildSceneNode("RobotNode")
node1.attachObject(ent1)


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



thanks for any aid

OvermindDL1

20-10-2006 19:40:34

Please post using code tags so in the browser it will retain whitespace...
from pyogre import ogre
import SampleFramework


class TutorialApplication(SampleFramework.Application):
def _createScene(self):

pass
sceneManager = self.sceneManager
sceneManager.ambientLight = ogre.ColourValue(1, 1, 1)
ent1 = sceneManager.createEntity("Robot", "robot.mesh")
node1 = sceneManager.rootSceneNode.createChildSceneNode("RobotNode")
node1.attachObject(ent1)


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


I would wager a guess that it is because you are creating everything outside of the application...