Reveal in Finder v1.0


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Joshua LaCross
With a read or write node selected run this script and it will open the location in Finder. This is taken from Saurabh Sameer's script (reveal in explorer) that was made for windows and altered to work on a Mac. Let me know if there are any problems.
Requirements:
6.0, 6.1, 6.2 or later
Mac
04 May 2011
195
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def RevealFinder():
    import os
    import subprocess
    a=nuke.selectedNode()
    b=a['file'].value()
    u=os.path.split(b) [0]
    u = os.path.normpath (u)
    print u
    subprocess.Popen(['open', '-R', '%s' % (u)])
 
 
 
mymenu=nuke.toolbar('Nodes',)
 
mymenu.addCommand('RevealInFinder','RevealFinder()')
 

 

Please login in order to download these files.

Comments   

 
0 # Ahad Mohebbi 2011-05-05 04:59
Thanks for your useful python
This is for linux

def RevealFinder():
import os
import subprocess
a=nuke.selected Node()
b=a['file'].val ue()
u=os.path.split (b) [0]
u = os.path.normpat h (u)
print u
subprocess.Pope n(['nautilus',' %s' % (u)])
 
 
0 # Nic v 2011-08-29 02:41
OMG this is so useful, thanks so much :-)
 
 
0 # Manley Gage 2011-09-24 10:42
This is not working for me.. I select the footage and click the finder button but nothing happens :P
 
 
0 # Joshua LaCross 2011-09-26 14:02
Manley, I'm not sure what the problem could be. What version of Mac OSX and Nuke are you running?
 
 
0 # Anthony Dobbs 2011-10-19 12:11
Love this tool. Not sure why it's not a Foundry standard. However, I've recently switched to relative directories for my scripts and read nodes, so this no longer works. Any suggestions for this problem?
 
 
0 # Joshua LaCross 2011-10-21 18:36
Sorry, I haven't had a chance to look into this. I'm not exactly sure how to address it but its probably something to do with "normpath". You might try using "relpath"
os.path.relpath (path[, start])
http://docs.python.org/release/3.1.3/library/os.path.html#os.path.normpath
 
 
0 # Austin Tyler 2020-01-22 20:52
this script works great, but for some reason there is often a huge delay of 30+ seconds before finder opens. Any ideas?
 

You have no rights to post comments

We have 3899 guests and 141 members online