Nuke Scene Collector

 v1.4

This is a shell script for OS X / Linux that reads Nuke files and collects Nuke script and all support docs to a location you specify.
Author
Dave G
Requirements
5.0, 5.1, 5.2, 6.0, 6.1, 6.2 or later
Linux, Mac, Windows
Created on: 25/01/2011
Updated on: 25/01/2011
Downloads: 360
Login or Register

This is a shell script for OS X / Linux that reads Nuke files and collects the scene to another location for archiving. Great for transferring projects and contents to an external device. Usage: run script on scene file (path/to/script path/to/nukescene.nk).

version history:

1.1: now makes a relinked copy of the script as well as an unaltered copy to the destination folder. See it in action: http://www.vimeo.com/17030922

1.2: added a uniq line stripping so it wouldn't trip over duplicated read nodes

1.3: now works with source files that may be nested within a folder with a space in the name. You still need to collect to a clean path (/Volumes/no/space/destination/) for the relinked copy to work, so that's the only limitation. 

1.4: minor change to better translate numbers ([0-9]*) in the copy command instead of just a generic (*) catchall wildcard that could trip up some copies.

Comments (12)

J Bills said:

...
thanks, using this religiously now!
October 20, 2010

francisco palomares said:

...
Awesome. This is the solution we've been waiting for during a long time ago!
December 13, 2010

darren coombes said:

...
Hate to sound like an idiot, but how do i get this working?
January 20, 2011

DAve G said:

...
darren - drag the shell script .sh file into a Terminal window and before hitting enter, drag the nuke scene file into the Terminal so that it forms a text line similar to this: /Volumes/MYBACK/DOWNLOADS_MB/nukecollect.sh /Volumes/HOME_RAID/WORK/temppostlight.nk and then hit enter and follow the prompts.
January 20, 2011

darren coombes said:

...
Thanks Dave, i tried doing the above and it comes up with "Permission denied" (see below for terminal text)

Suite03:~ editor$ /Users/editor/Downloads/nukecollect.sh /Volumes/RAID/0_Misc/Texture Mapping.nk
-bash: /Users/editor/Downloads/nukecollect.sh: Permission denied
January 20, 2011

DAve G said:

...
ah - it looks like the script loses execution permissions when you download it, maybe for browser security reasons. Add execution permissions to the script in the terminal by entering this: chmod +x /Volumes/MYBACK/DOWNLOADS_MB/nukecollect.sh - obviously the part after +x is the path to your downloaded script.
January 20, 2011

darren coombes said:

...
Thanks Dave, it worked on my laptop, but not on our system here at work. We unfortunately have spaces in between characters on some folder names, and it must be making the script not function properly. Something we may need to fix. Thanks
January 20, 2011

DAve G said:

...
that's why you should drag the file into the window, so that it's properly "escaped," in UNIX terms. There are two easy ways to fix the path with spaces: put a slash before the space or put quotes around the full path: /Volumes/HOME_RAID/file folder with spaces/doc.nk or "/Volumes/HOME_RAID/file folder with spaces/doc.nk"
January 21, 2011

DAve G said:

...
the server parsed my note about incorrectly taking out the back slashes. it should be /Volumes/HOME_RAID/fileBACKSLASHHERE folderBACKSLASHHERE withBACKSLASHHERE spaces/doc.nk
January 21, 2011

DAve G said:

...
I realized you were talking about spaces in the path to the documents or source files tripping it up so I whipped up a copy that works with those: http://www.can-con.ca/download...nnames.zip . It will not work with file or path names that don't have a space in them so use one or the other until I add a check to an updated script. The problem is that Nuke scripts put quotes around paths with spaces in them and not around paths with no spaces, so it makes matching and replacing trickier. It's not much work to make it work for both but it's late.
January 22, 2011

DAve G said:

...
ok - I removed the link above because the 1.3 script I just submitted now works for both cases (spaces in path and no spaces in path, mixed or not).
January 23, 2011

DAve G said:

...
just a note for Linux users - I just noticed that Ubuntu puts single quotes around paths when you drag the folder into the terminal window. These quotes will trip up the collecting if around the destination path. Write out the path without quotes and it will work.
January 28, 2011

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy