adding filebrowser bookmarks with python

Hello

I’m bringing blender into the pipeline of my company, we have a program which launches applications with settings for selected show/show. For blender we run a script which registers a few operators and builds a menu and that works fine. However I would like to be able to add paths to the current projects relevant folders to the file browser bookmarks. As I understand it the “Bookmarks” are defined in a user specific file, which I guess I could find and edit every startup but that sounds messy. Are the other bookmarks picked from some environment variable or something easy to change on startup? or are there an easy way to add stuff there with python?

Bookmarks is just a text file in the user resource path. You could add a load_post handler to the startup/ folder that manipulates this file at startup, adding bookmarks to list. Not exactly sure what your trying to do though.

Yeah I thought about doing that but it would also mean removing old bookmarks and guess which isn’t the users own…

What I’m trying to do is to have project specific folders added automatically. Folders where you normally export or import stuff, textures and whatnot. So when you switch to another project you don’t have to add them and remove old manually.