Python - Go To NAS Folder

Has anyone created a relative python script for going to a particular folder on the NAS in the MediaHub?
I always title my projects the same as our jobs folder on our NAS. Makes it easy for reusing bookmarks. I’d like to go to a particular folder. /project_name/today’s_date/etc. I often do additional compression running FFmpeg and would like to be taken automatically to that folder.

1 Like

There are a couple scripts that might be useful on the Logik Portal.

Reveal Path - You can right click on a clip in either the media panel or media hub and have either the media hub or a finder window open to the path of the clip.

Create Export Presets - You can assign an export preset to a right click menu, then once the export is done there’s an option to have a finder window open to the exported clips path.

Mike

i guess what I’m looking for is after doing an export, that the python script will do an shift + 1, which I can do with a hotkey, and then it will go to particular folder in the MediaHub. I don’t want it to be a finder window but a MediaHub location. Make sense?

Check out the Create Export Menus. When creating the menu for the export click the Reveal in MediaHub button and whenever you use that menu to export a clip it will open the MediaHub to the export location when the export is done.

2 Likes

That’s what I’m looking for. Will let you know. thanks.

Where can i find this Mike?

1 Like

@MikeV is the keeper of the Logik Portal. It’s a Python Script that you download, chuck it in /opt/Autodesk/shared/python and it creates this handy dandy place for you to automatically download and install other Python Scripts from www.pyflame.com .

You can download it from here…

or if you want to individually download them…

Like this…

Thank guys. I guess my Logik Portal script was not updated. It would have shown this script.
But on another note, a 4000 line script is not trivial. There is some deep coding in there.
I just wonder if opening the MediaHub to /xxx/yyy/todays_date/ is a viable option using flame python. It doesn’t need to know where I’ve exported since it’s always to the same place followed by the date.
Amazing script though. Must have put in many many hours.

It was more like lazy coding. There’s a lot of repeating code in that script that I’ve been putting off cleaning up.

If you simply want something that will open the MediaHub that should be pretty easy to do using this:

import flame
flame.go_to(‘MediaHub’)
flame.mediahub.files.set_path(‘some_path_here’)

Thank you Mike. Will check it out.

with a little help I was able to use this. It’s a part of my custom export presets.

def go_to_post_folder(selection):
import flame
import os
import datetime

 now = datetime.datetime.now()
 today = now.strftime("%Y_%m_%d")
 projectName = flame.projects.current_project.name
 destinationPath = '/mnt/nx2data/jobs/' + projectName + '/POST/' + str(today) + '/'

 flame.go_to('MediaHub')
 flame.mediahub.files.set_path(destinationPath)
2 Likes