What kinds of NUKE tips do you need? Join the Steve Wright's NUKE NUGGETS group on LinkedIn, and post your requests there.
Skill Level Intermediate
- [Steve] Hi, this is Steve Wright, welcoming you to this week's Nuke Nugget, how to reconnect all media with a single search and replace. So you've moved your project to another machine, or the media's been moved to another drive, so when you open your Nuke script, you've got the red read nodes of death. You can quickly reconnect all the media with a search and replace for the read node path names, but there's a catch, but for every catch, there's a workaround. So let's see what's going on here. First thing we need to find out, what our new path name should be, so I like to do is open up one of the wrong ones, and I'll make a copy of it and use the copy to navigate to the right path name.
So I think I'll go here, and there, there, and there. Okay, so... I now have the correct path name right here, and down here is the wrong path name. Okay, let's start our search and replace and find that catch. We need to select all the read nodes in the entire Nuke script, so there's a tool in here for doing that, so all you do is pick any read node, select it, light it up, then we do edit, select similar, class.
That will go through your entire Nuke script and select all the read nodes, no matter where they are. Okay, with all read nodes selected, we're ready for the search and replace. For that we do edit, node, filename, search and replace, and we get the search and replace dialog box. Now we're ready to enter the search for field with the wrong path name and the replace with field with the correct path name. Now, myself, I do not like to type in path names.
Okay, real error prone. So, all we have to do is copy, Copy (groaning) It won't copy! And there's the catch. You cannot copy and paste once the focus is on this search and replace dialog box you're dead in the water. Okay, so now it's time for the workaround. Let's cancel this. The first part of the workaround is to capture the right and the wrong path names into a single location.
I like to use a backdrop node. So I'll just come up here and add a backdrop node. Okay, double-click to open it up. So here is my good path name here, I'll copy and put that in the backdrop node. Hit a return. And here is the wrong path name here. Right there. And it doesn't matter which one's on the top or the bottom. The key is we've got them both in one spot. Now that you've got them both, now, copy them, command or control + C to put them in the clipboard. OK? Alright, now, back to the top.
Select a read node. We have to pick them all, so, edit, select similar, class. By the way, once you have them all selected, make sure you don't accidentally click somewhere because they'll all be deselected. Okay, so, select, similar, class. Okay, we're ready to try our search and replace one more time. Edit, node, filename, search and replace.
Now, I already have both path names in the clipboard. So now I can just do a paste, and a paste. Because I can actually edit these. I can't touch, edit, copy, or paste anything else anywhere outside of this dialog box. So I want to search for... the wrong path, replace with, the correct path, OK, and there they go. All my read nodes are all lit up, ready to go. Now you could also load the Nuke script into a text editor, not a word processor, but a text editor and do a search and replace on all the path names in the text editor.
So there you have it. How to quickly reconnect all your media when the project's been moved. Be sure to check in next week so you don't miss out on my next Nuke Nugget.