Little console tip - bookmarks for real

Ever wished you could add bookmarks when opening or saving scripts from the python console?
It never worked for me (mac, linux, many systems and versions) from the console. In case it can help, here is a work around.

From the python console, when you want to open or save a script, it opens a browser where you can navigate to folders.
On the left panel you can see ‘bookmarks’ or can drag and drop folders and it looks like you add them to the bookmarks … but next time you go there, the previously added bookmarks are gone. They don’t stick there.

One way I found to stick bookmarks there is to add them from another instance of the browser, opened via a hook. You can use any dummy QFileDialog as long as it brings you to the browser. Once there navigate away and add (drag and drop) your destinations onto the left pane and voila, just cancel or close the browser.
From there, next time you want to open or save a script from/to the python console, the bookmarks will be there.
Long story short, don’t add the bookmarks from the console, add them from any other instance of the browser.
If you don’t have a dummy hook handy, you can use this autodesk examples found (on mac) there: /opt/Autodesk/-flame version-/python_examples/
Just copy it into your /opt/Autodesk/shared/python folder and rescan the hooks (shift+ctrl+H+P)

Enjoy :slight_smile: