SearchReplacePanel v1.2

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

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.:
    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

import SearchReplacePanel


'''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'Pane').addCommand('SearchReplace', addSRPanel)
nukescripts.registerPanel('com.ohufx.SearchReplace', addSRPanel)

The above code in the will give you this:

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

Please login in order to download these files.


+2 # 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.

# 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:

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
# asin shin 2016-10-06 11:50
Hi, thankyou very much!, btw where should i put SearchReplacePa ?

the link video not found

# 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.
# roshan maharjan 2018-01-08 06:43
but it didn't change my write node path
# Frank Rueter 2018-01-08 10:14
I use it all the time to change my write node path. are you seeing any errors?
# roshan maharjan 2018-01-10 09:27
thanks man, there is no error it fixed.
# Dima Dragun 2018-03-18 11:31
Hello, Frank. Thank you for your tool. I used it by last 2 years, but in this year it didn't work ): I have try to reinstall it few times, but it didn't launch like before. I have button in Window-Custom-S earchReplace, but when I click it nothing is happing. I really don't have any ideas. Could you help me? Thank you.
Mac OS High Sierra, NukeX 10 and 11 any versions.
# frank admin 2018-03-18 22:52
Hi Dima, when you so you can see the panel but when you push the button id doesn't work? Can you see anything in the script editor or the error console? When you launch Nuke from a terminal, can you see any output in that terminal when you push the button?
# Dima Dragun 2018-03-19 08:42
I don't have any message in error console inside nuke, but I have message in terminal:
Traceback (most recent call last):
File "/Users/d.dragu n/.nuke/myTools /scripts/menu.p y", line 55, in addSRPanel
myPanel = SearchReplacePa nel.SearchRepla cePanel()
File "/Users/d.dragu n/.nuke/myTools /scripts/Search ", line 24, in __init__
self.history = nuke.Enumeratio n_Knob( 'history', 'Recent Searches', self.loadHistor y() )
File "/Users/d.dragu n/.nuke/myTools /scripts/Search ", line 53, in loadHistory
xmlTree = ElementTree.par se( self.historyFil e )
File "/Applications/ Nuke11.1v2/Nuke ents/Frameworks /Python.framewo rk/Versions/2.7 /lib/python2.7/ xml/etree/Eleme", line 1182, in parse
tree.parse(sour ce, parser)
File "/Applications/ Nuke11.1v2/Nuke ents/Frameworks /Python.framewo rk/Versions/2.7 /lib/python2.7/ xml/etree/Eleme", line 657, in parse
self._root = parser.close()
File "/Applications/ Nuke11.1v2/Nuke ents/Frameworks /Python.framewo rk/Versions/2.7 /lib/python2.7/ xml/etree/Eleme", line 1665, in close
self._raiseerro r(v)
File "/Applications/ Nuke11.1v2/Nuke ents/Frameworks /Python.framewo rk/Versions/2.7 /lib/python2.7/ xml/etree/Eleme", line 1517, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: unclosed token: line 1, column 363
# Dima Dragun 2018-03-19 08:53
screencast from my machine for better explain
# Frank Rueter 2018-03-19 20:48
Hi Dima,
it looks like the panel has trouble reading your history file. Can you show me the contents of your ~/.nuke/srhisto ry.xml ?
Try moving it away or renaming it to a temporary name and see if the panel comes up then (it should generate a new history file).

# Dima Dragun 2018-03-24 11:48
Frank, thank you so much! It's help! I just delete srhisto ry.xml file and your tool launch.
In this file was next (I delete here brace, becouse this site don't let me write this on comment):
ITEM replace="080" search="190" /
ITEM replace="0050" search="0080" /
ITEM replace="0110" search="0050" /
ITEM replace="0020" search="0060" /
ITEM replace="0030" search="0020" /
ITEM replace="0030" search="0110" /
ITEM replace="0090" search="0030" /
ITEM replace="FOOTAG E" search="FOOTAGE " /
ITEM replace="footag e" search="FOOTAGE " /
# Frank Rueter 2018-03-25 00:58
not sure if the site formatted the text you pasted, but if this is actually what was in the srhistory.xml it sure was busted for some reason.
I use this all the time and haven't had this issue, so maybe you accidentally did something to the history file that caused it to become invalid xml syntax which would have caused the error you saw.
Let me know if it happens again and I will put a fail-safe in place when trying to read the history file.
# Jerome Desvignes 2018-12-21 11:09
hello, i have an issue with the way of calling it from a menu
in dont want to modifiy the main app menu so i use a launcher where i add some command like creation of compagny menu

it lauch the search and replace but it doesn't look like yours

here is my code,

import SearchReplacePa nel
menubar ="Nuke")
tbmenu = menubar.addMenu("&My_Compagny")
tbmenu.addCommand("Search and Replace Panel", "SearchReplaceP anel.SearchRepl acePanel() ")
#tbmenu.addCommand("Search and Replace Panel", SearchReplacePa nel.SearchReplacePa nel(),)
if nuke.env[ 'studio' ]:
import SearchReplacePa nel
tbmenu.addComma nd("Reserve Frame Server Slaves", SearchReplacePa nel.SearchReplacePa nel(), "")

i also have trouble to integrate this line

nukescripts.registerPanel('com.ohufx.SearchReplace', addSRPanel)

as i dont use a def to appen to menu, i must also add that i'm very new to code :)

any idea ?
# Jerome Desvignes 2018-12-21 11:40
i have finally find my way :)

import SearchReplacePanel
menubar ="Nuke")
tbmenu = menubar.addMenu("&My_Compagny")

import SearchReplacePanel

def addSRPanel():
'''Run the panel script and add it as a tab into the pane it is called from'''
myPanel = SearchReplacePa nel.SearchRepla cePanel()



tbmenu.addCommand('SearchReplace', addSRPanel)

nukescripts.registerPanel('com.ohufx.SearchReplace', addSRPanel)

i also change the addToPane by show wich is more convenient for me

thanx a lot for your script !
# frank admin 2018-12-23 02:32
glad you got it working

You have no rights to post comments

We have 2716 guests and 87 members online