SearchReplacePanel

a better search and replace panel

Updated: 13 May 2021

Author: frank

Compatible Nuke versions: 10.0 or later

Compatibility: Linux, Mac, Windows

watch the videoTool Video

v1.3: Nuke 13. compatible


 

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

Sign in or register to download or rate.