SearchReplacePanel v1.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
a better search and replace panel
Requirements:
5.2, 6.0, 6.1, 6.2, 6.3 or later
24 Sep 2015
1542

watch the videoTool Video

v1.2: fixed bug to make the panel work with file paths without sequence padding (e.g. quicktimes, still frames, etc)


v1.1: added features:

 

  • added tooltips
  • option to turn off case sensitivity
  • history menu for quick access of previous search&replace actions
  • control the size of the history when creating the menu, e.g.:
    1
    
    srPanel = SearchReplacePanel.SearchReplacePanel( maxSteps=5 )

     

This was actually my first test project when python panels became available and has proven very handy tucked away in the pane menu for easy access.
To load the panel into the 'Pane' menu and make it save with layouts properly, drop something like this into your menu.py:

1
2
3
4
5
6
7
8
9
10
import SearchReplacePanel

def
addSRPanel():

'''Run the panel script and add it as a tab into the pane it is called from'''
myPanel = SearchReplacePanel.SearchReplacePanel()
return myPanel.addToPane()
 
#THIS LINE WILL ADD THE NEW ENTRY TO THE PANE MENU
nuke.menu('Pane').addCommand('SearchReplace', addSRPanel)
 
#THIS LINE WILL REGISTER THE PANEL SO IT CAN BE RESTORED WITH LAYOUTS
nukescripts.registerPanel('com.ohufx.SearchReplace', addSRPanel)

The above code in the menu.py will give you this:
SR_02

You can chose to perform the search&replace on all nodes or just selected ones:
SR_03

Please login in order to download these files.

Comments   

 
+1 # Frank Rueter 2010-10-18 16:25
just subscribing...
 
 
# Dennis Serras 2011-03-01 12:41
Thanks for making this. You'd think there would be one of these in Nuke already! Or if there is, I'm too big of an idiot to find it. I duplicate and rename my nodes all the time and you just saved me a ton of work.
 
 
# Carlos Trijueque 2011-10-28 04:59
I use it almost daily. Nice improvements.

Thanks!
 
 
# Cameron Carson 2012-02-14 16:55
Nice piece of scripting. However, It appears to hang when searching any nodes that are local cached. Strange.
 
 
# Frank Rueter 2012-02-15 17:58
Hi Cameron, I can't reproduce this. Can you see any info in the script editor or error console? What version are you running? How big is your script?
 
 
# Cameron Carson 2012-02-15 18:27
It's a fairly large comp. Upon further inspection it doesn't appear to be caused by the locally cached files. Just seems to hang when certain files are selected. Even if i just select that one read node. It's rather odd. No worries though I have just been going back to the old open the .nuke in a text editor and Find & Replace that way.
 
 
# Priyank Murarka 2012-03-15 13:53
Very very useful.. Thanks!
 
 
# Gary Couto 2012-03-16 10:17
Awesome! Thanks!
 
 
# Carlos Rubio 2012-05-21 08:03
Thank you very much!!!
 
 
# Laurent Reynaud 2012-06-28 03:56
where do I need to paste the SearchReplace.p y ?
 
 
# Frank Rueter 2012-06-28 15:38
Have a look at this:
http://www.nukepedia.com/video-tutorials/22/video/

The example code required to hook things up is on the top of the page.
Hope that helps.
 
 
# Travis Button 2013-02-15 14:47
Awesome tool Frank! Wish I would have found this months ago. Great addition right there by the side of MassivePanel. Is there a way to get it in the pane dock automatically upon opening Nuke without saving it as part of your layout? I feel like MassivePanel just showed up after I installed it, never had to actually select it through the Pane menu but can't figure it out for Search and Replace.
 
 
# Frank Rueter 2013-02-15 16:18
I can have a look but am pretty swamped for the next few weeks. might need a reminder ;-)
 
 
# Cristian Predut 2014-02-16 13:25
Excellent, this saved me days of work! Well done :)
 
 
# Josh Robertson 2014-07-05 00:13
Awesome tool Frank! I use this all the time for remapping nodes that seem to have lost their way.

I did modify the script by changing the "self.replaceSt r = nuke.String_Kno b" to a File_Knob as I primarily am change the file path and it just made it quicker and more convenient if I couldn't remember the exact file path. Plus it still works to replace anything even if I don't put in a file path :P

Again awesome script thanks Frank!
 
 
# Evgeny Shpilivoi 2016-08-03 15:40
best!
 
 
# asin shin 2016-10-06 11:50
Hi, thankyou very much!, btw where should i put SearchReplacePa nel.py ?

the link video not found

thanks
 
 
# Frank Rueter 2016-10-07 02:33
put the py file anywhere in your nuke plugin path, if in doubt in ~/.nuke (where "~" is your home directory).
The link to the video works fine for me.
 

You have no rights to post comments

We have 2530 guests and 135 members online