Horde3D
http://www.horde3d.org/forums/

Blender Exporter
http://www.horde3d.org/forums/viewtopic.php?f=6&t=1181
Page 1 of 1

Author:  pekuja [ 16.06.2010, 11:43 ]
Post subject:  Blender Exporter

Hello,
I found that the Blender exporter has a problem in that it assumes that people have set their resource paths for materials, models and textures, as the referenced paths in the exported files don't have prefixes such as "materials/" or whatever regardless of where you make the exporter create them. To rectify this, I've added a new field to the exporter dialog called "base path", which I have by default set to ".." so that if you're outputting your model in "/some/path/myproject/models/mymodel.scene.xml" and your materials in "../materials", the material referenced in the scene file will be prefixed with "materials/". Currently there's no way to go back to the old behavior. I'm not sure if that's needed or not. I did find that this at least makes working with the Scene Editor easier, and it matches the type of paths used in the sample models.
Edit: I forgot to add the relative path to the .geo filename. This updated patch replaces the old one. This is the changed line:
# Write model header
- sceneFile.write('<Model name="%s" geometry="%s.geo">\n' % (fileName, fileName) )
+ sceneFile.write('<Model name="%s" geometry="%s.geo">\n' % (fileName, os.path.relpath(fileName, self.__basePath) ) )

Attachments:
File comment: Forgot to add the relative path to the .geo filename.
Horde3D Blender Export.patch [6.81 KiB]
Downloaded 726 times

Author:  pekuja [ 17.06.2010, 23:43 ]
Post subject:  Re: Blender Exporter

On a separate note about the exporter, it seems like animation support is a bit broken. The result I got was that the joints were being animated, but they had no effect on the model inside the engine. Also another problem is that the exporter only exports the currently selected animation, so it's a bit of a pain to get all of them exported. That shouldn't be too hard to fix though.
I think I'll try to fix that at some point when I really need the feature, but if anyone else wants to take a stab at it, please do.

Author:  marciano [ 26.06.2010, 18:37 ]
Post subject:  Re: Blender Exporter

Thanks for your patch. Unfortunately, I think no one is really maintaining the export script at the moment :/

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/