Dotscene loader?

Sindwiller

10-05-2008 11:37:46

Does anyone know if there is a dotscene loader (or a wrapped dotscene loader inside Python-OGRE) for Python-OGRE? That'd be really useful.

Thanks in advance. :)

Entropai

10-05-2008 18:40:55

Does anyone know if there is a dotscene loader (or a wrapped dotscene loader inside Python-OGRE) for Python-OGRE? That'd be really useful.

Thanks in advance. :)


Umm not sure what you're exactly looking for. But there's dotscene (named so) loading example in the demo section of pythonOgre.

Sindwiller

11-05-2008 11:31:34

Hm, yeah. Point taken. ^^ However, it doesn't seem to work correctly for some reason.

Traceback (most recent call last):
File "C:\PythonOgre\demos\ogre\fps.py", line 260, in <module>
ta.basic()
File "C:\PythonOgre\demos\ogre\fps.py", line 137, in basic
self.setupScene()
File "C:\PythonOgre\demos\ogre\fps.py", line 193, in setupScene
self.map = ds.DotScene("map.scene", self.sceneManager)
File "C:/PythonOgre/demos/ogre\dotscene.py", line 23, in __init__
nodes = self.findNodes(minidom.parse(self.fileName).documentElement,'nodes')
File "C:\Python25\lib\xml\dom\minidom.py", line 1913, in parse
return expatbuilder.parse(file)
File "C:\Python25\lib\xml\dom\expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'map.scene'


Any idea why it doesn't find the file? It should actually find it, the directory is in the resources file and thus is loaded.

Entropai

11-05-2008 14:45:21

Hm, yeah. Point taken. ^^ However, it doesn't seem to work correctly for some reason.

Traceback (most recent call last):
File "C:\PythonOgre\demos\ogre\fps.py", line 260, in <module>
ta.basic()
File "C:\PythonOgre\demos\ogre\fps.py", line 137, in basic
self.setupScene()
File "C:\PythonOgre\demos\ogre\fps.py", line 193, in setupScene
self.map = ds.DotScene("map.scene", self.sceneManager)
File "C:/PythonOgre/demos/ogre\dotscene.py", line 23, in __init__
nodes = self.findNodes(minidom.parse(self.fileName).documentElement,'nodes')
File "C:\Python25\lib\xml\dom\minidom.py", line 1913, in parse
return expatbuilder.parse(file)
File "C:\Python25\lib\xml\dom\expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'map.scene'


Any idea why it doesn't find the file? It should actually find it, the directory is in the resources file and thus is loaded.


Unless you have written your own parsing for resources it wont work. In default the resourcemanagment wont load xml resources.
Check
http://wiki.python-ogre.org/index.php/Advanced_Tutorial_1
Or just use directly filename and path to get started.

ethankennerly

08-06-2008 16:58:22

FYI, two Python-Ogre dotscene loaders posted:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4209

Two questions for a more permanent solution:
1) Am I correct in believing the Python-Ogre 1.1 demo 'dotscene.py' doesn't work with the latest Blender scene exporter?
2) If one of the linked examples works, how do we get one of these to replace the default demo 'dotscene.py' in the distribution?

-- Ethan
http://runesinger.com

Zyzle

16-06-2008 00:18:03

I realise I'm re-opening an old topic here but meh, this forum is pretty quiet and I like showing off my work :P

Anway I've just finished the tutorial page regarding Bloops dotscene loader, you might find it helpful.

http://bloop.sourceforge.net/wiki/index.php/DotScene_Loader