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 1708 times
|
|