Page MenuHome

Obj export and # Blender MTL File: string in the mtl file problem
Closed, ResolvedPublic

Description

r45595, Win 7, 64 Bit

By default Blender adds a # Blender MTL File: 'myfile.blend' at the top of the mtl file when you export an obj file. This just works when the blend file was saved before. When i load a let`s say obj file and export the mesh immediately then i get a # Blender MTL File: '' string instead. With missing filename.

I do question this behaviour a bit. I don`t see a need to write the filename into the mtl file at all. But when it is implemented, then it should work the same way in all cases :)

Have a look at the example files. The first obj was exported immediately after importing the original obj file without the blendfile being saved and reloaded. The top of the mtl file shows this # Blender MTL File: '' string. The second obj is saved after i have reloaded the blend file. And here it contains the filename.

Details

Type
Bug

Event Timeline

Don’t see any bug, it’s just that as long as you haven’t saved it, there is no file name, seems pretty logical…

Anyway, that # line is a comment, right? So I don’t see the point… Can add a dummy "# Blender MTL File: None" in this case, if you want?

Hmm, you`re right, now that i think twice about it. A None would make more sense to me though :)

Fixed in svn3291.

Thanks for reporting!

Bastien Montagne (mont29) closed this task as Resolved.Apr 20 2012, 9:48 PM