fxT_revealInFolder v2.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Tor Andreassen
Website: www.fxtor.net
This script loops through all selected nodes and checks if the node has a file knob. If a file knob is present, the path will be opened in the OS file manager/browser. The user will be notified if nothing is selected or if the user does not select any nodes that have an existing file-path. If a selected node has a nonexistent path, this will be printed in the script editor, and the script will continue to process the next selected node. All paths are tested for an existing file. However, due to rendered files being frequently opened and deleted, write nodes only test for an existing directory.
Requirements:
13.1, 13.0, 12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11 or later
Linux, Mac, Windows
12 Jun 2022
655

fxT_revealInFolder v2.2

This script loops through all selected nodes and checks if the node has a file knob. If a file knob is present, the path will be opened in the OS file manager/browser. The user will be notified if nothing is selected or if the user does not select any nodes that have an existing file-path. If a selected node has a nonexistent path, this will be printed in the script editor, and the script will continue to process the next selected node. All paths are tested for an existing file. However, due to rendered files being frequently opened and deleted, write nodes only test for an existing directory.


OS Support: Windows, OSX, Linux

Linux:
As there is no standard file manager on Linux, I have chosen to set the file manager/browser for Linux as a fixed variable.

This can be set in the 'setLinuxFileManager.py' file, where you can also find instructions for how to set your chosen file manager if you prefer a certain app for that. PS: It's very easy, no scripting knowledge is needed.

 

Supports: Existing paths of the type:
- scripted paths (for example, paths made up of TCL)
- local paths


- server paths:

      should work, but might need rework after code restucure and py3 conversion
      currently dont have a widows test machince for this case, feel free to report issues

 

 

revealInFolder

 

Install Notes:

Full install notes are listed step by step in the top of the python file.
IMPORTANT: To change the file manager used on linux, edit the 'filemagager'-variable in the attached python file.

To install the tool in it's own nuke menu with the attached menu icon: please see attached 'init.py' and 'menu.py' files. 
Install the tool and icon file according to the paths in the 'init.py' file, or alternetivly change these paths to your own preferred install location.


Change Log:

v2.2: 
Windows local paths fix.

v2.1: Code cleanup and support for nuke 13. Not backwards campatibel, for nuke12 use version 2.0.
         PS: The menu.py and init.py code has been changed for this version, make sure to update.

 

Share if you like it, but don't repost as your own.
Please login in order to download these files.

Comments   

 
0 # Octavio Mancilla 2014-10-06 02:27
Thanks for sharing! This is now one of my most used commands =)
 
 
0 # Tor Andreassen 2014-10-24 16:01
No problem Octavio, glad you find it useful. Also, there is now a updated version that now works for scripted file paths.
 
 
0 # Tor Andreassen 2015-05-14 01:26
v1.4: major update. Fix for bugs that caused errors on invalid paths. Code extended to catch many more possible errors, also fixed an error with local Windows paths.

Enjoy, and please feel free to comment if you have bug reports or suggested feature updates.
 
 
0 # Ben Warburton 2015-05-14 17:11
It works great, except I'm getting the result in a chrome browser. I'm assuming this has something to do with nukes default browser setting. Any way to specify Dolphin file browser in linux?
 
 
0 # Tor Andreassen 2015-05-14 17:49
Thanks for your feedback Ben, much appreciated.
Interesting, yes that can be fixed but I'll have to look into it - didn't have a linux machine at hand when writing the tool. I'll post a update here when I get to it.

If you want to poke around yourself before I get to it, here is a link: http://community.thefoundry.co.uk/discussion/topic.aspx?f=189&t=98157
 
 
0 # Tor Andreassen 2015-05-14 17:53
Btw, can I ask what distro/version of linux you are running?
 
 
0 # Ben Warburton 2015-05-14 20:09
I did the following for myself, which now works.

replaced :

nukescripts.start(openPath)

with :

n = openPath
inner_cmd = '\"dolphin %s &\"' %n
exec "os.system(%s)" %inner_cmd

This now opens dolphin with the selected nodes file path. Its probably not the best way, but it works xD
 
 
0 # Tor Andreassen 2015-05-16 21:44
Thanks Ben, glad you found a quick fix, I'll update the tool once I have some more time.
 
 
0 # Tor Andreassen 2015-06-14 20:52
v2.0 is now updated with a fix for Linux.

I have included a separate python file where one can set the file manager/browser of choice. No need to edit the main python file. Instructions is included in the .py file.

Menu icon is also included.
 
 
0 # Johannes Masanz 2015-07-30 08:57
The one that i use, opens the nk script directory when nothing is selected.
 
 
0 # Tor Andreassen 2015-07-30 09:13
That is strange. The script never picks up the nuke script directory. It's based of the file-knob of a node or multiple nodes.

I just did a clean install of the latest version of this script, and it works as it's suppose to.

Can you clarify a little more? What OS are you running and are you running the latest version?
 
 
0 # Johannes Masanz 2015-08-01 14:38
Sorry! I was not very clear about that. I meant that it is a nice feature in an other revealInFolder script, called 'BrowseDir'.
http://www.nukepedia.com/python/misc/browsedir
This cannot browse multiple paths at once though.
 
 
0 # Tor Andreassen 2015-08-01 18:44
Ah, yeah it absolutely is! Thanks for sharing that script.

I usually have a shot-menu that can access the various folders of the show (renderfolder, scriptfolder, ref folders and so on, that is based on the script directory. Though it's very studio specific.

Thanks again for sharing :)
 
 
+1 # Tor Andreassen 2022-06-12 00:27
v2.1: updated for nuke13. Not backwards compatible, for nuke 12 use version 2.0.

PS: menu/init/.py entries have been modified for this version

Enjoy!
 
 
0 # romain biermann 2022-06-12 06:08
Hey Tor, thanks for the update!

I am getting:

'LookupError: unknown encoding: string_escape'

apparently 'string_escape' was replaced with 'unicode_escape ' in python 3.

However after replacing this, the script does not open the filepaths or return an error. It does work as intended when nothing is selected though.

nuke 13.2v1 win10

Any idea?
 
 
+1 # Tor Andreassen 2022-06-12 13:29
Hi Romain,

Thanks for reporting it, I just uploaded a new version. You can give v 2.2 a go and see how it works for you.

I just tested it for local paths on windows, which works fine on my end now. I currently don't have a windows server path to test on, so if you're having issues with paths starting with //. please let me know and I'll keep it in mind for when I have a windows machine to test on.

Hope this helps, thanks.
 
 
+1 # romain biermann 2022-06-12 16:22
Works a treat.
No issues on both local and network paths (windows).
Thanks again
 

You have no rights to post comments

We have 4034 guests and 26 members online