Full name of opened .blend-file


Is there any way to know the full file name of opened .blend-file?


import Blender
lastfile = Blender.Get('filename')

returns last file read or written, see also the API docs on Get() http://www.blender.org/documentation/249PythonDoc/Blender-module.html#Get

I’ve just read this documentation. I’ve just don’t understand meaning of phrase ‘file read or written’. Does it mean name of loaded/saved blend file name or imported/exported file names too?

The docs are not clear. Just try :slight_smile: (I tried a bit myself and as far as I can tell is just the last .blend file opened or save but exports’don’t register here.

It means the name of the last saved blend file or, if you haven’t saved yet, the name of the last opened blend file.