I am trying to run a script that prompts the user for a desired directory and file name for export. Ideally, this script would be run from the File -> Export menu and pop up a file browser window similar to how the included export scripts function.

The only way I've found to call Blender's file browser is via a file path property for a UI panel (i.e. How to add a "select path" input in a UI addon script?). Is what I'm trying for possible?


Blender comes with a template for this, see:

Text Editor -> Templates -> Python -> File Export

Run the script, it will execute immediately (which is just for testing), but it also adds a menu item to the export menu.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.