Nuke Scene Collector | v2.1 |
Dave G
5.0, 5.1, 5.2, 6.0, 6.1, 6.2, 6.3, 7.0 or later
Linux, Mac
Updated on: 08/10/2012
Downloads: 615
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.
2.0: More robust all around. Now uses "-exec cp" command via find so it doesn't choke on copying too many files. Now works with ### numbering for sequences as well as %04d type sequences. Fixed matching pattern that could copy some Write files. Now collects referenced LUT files.
2.1: works with scenes that use project directories as a relative root folder.
francisco palomares
said:
|
... Awesome. This is the solution we've been waiting for during a long time ago! |
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. |
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 |
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. |
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 |
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" |
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 |
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. |
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). |
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. |
khush Chinoy
said:
|
... ... would this work on a Windows platform? if yes then 1) how exactly??? 2)i need to archive some stereo setups... each read node has left and right eye renders and i have used the %V to load them both in the read node. can i use this script? |
DAve G
said:
|
... This won't work on Windows but there is a Python scene collect script here that should: http://www.nukepedia.com/pytho...kecollect/ |
Sebastian Metz
said:
|
... Hi Dave, first off: Thanks a lot for writing this script! Great functionality, which I could use ALL the time, IF there weren't those two things... So please consider this a feature request ;) 1. Make the script understand read nodes with the (Nuke 6.3v8) file sequence notation "path/filename_###.ext" instead of the "path/filename_d.ext" thing. This forces us to go through ALL the read nodes/do a batch find/replace every time.... 2. Add support for the project directory file path concatenation. At our site, since we are using Houdini for the 3D part and very much like the $JOB-variable method, we like to work with setting the Project Directory once in the scene settings and then taking advantage of relative read node paths. What do you think? Greetings from good ol' germany, Sebastian |
DAve G
said:
|
... thanks for the suggestions Sebastian. I needed to update the utility for some other stuff so I integrated your suggestion about #### sequence notation in version 2.0, which is now live. If you send me a sample scene that uses your $JOB variable, I can take a look at supporting that. Email a sample script to daveg at can-con dot ca -- thanks, |
