scriptCleanup

cleanup current nuke script: collect all nodes that are not connected to any node and/ or which output is not used at all in the current script. these nodes can then be disabled or removed with one click

Updated: 2 January 2019

Author: leafpictures

Compatible Nuke versions: 8.0 or later

Compatibility: Linux, Mac, Windows

  a brief video demonstration can be found here:

  https://www.youtube.com/watch?v=4ObtaBFKHyw

 

  description:
  collect all nodes that are not connected to any node and/ or which output is not used at all in the current script.
  Hold Shift and press C. This opens the scriptCleanup window in which you can choose to select:

  dependent nodes: Node's output is not used; Nodes that are connected to the node's output
                   (all nodes that read information from this node)

  dependency nodes: Node's input is not used; Nodes that are connected to the node's input
                   (all nodes referred to by this node)

  if nothing is select: check for all nodes that don't have any inputs connected

  in both methods (dependent/dependencies) these node connection options are included:
  connection via expressions
  connection via visible input pipes
  connection via hidden input pipes


  after clicking the 'collect' button the window shows unused nodes depending on the selected mode: nodes that are
  not connected to any node and/ or which output is not used at all.

  The nodes table shows a row for each unused node:
      # a button with the name of the unused node. By clicking it the dag gets navigated to the node
      # a checkbox for batch processing disable/enable (se below)
      # a button to remove the node

  At the bottom of the window you have three buttons:
  # toggle check/uncheck nodes: check or uncheck all unused nodes in the table
  # disable all checked nodes: click this button to disable all checked nodes. If a checkbox is unchecked then
    the unused node will be enabled
  # remove all checked nodes: click this button to remove all checked nodes

  instalation:

  put the whole scriptCleanup folder in your nuke home directory
  in init.py in your nuke home directory add this line (without '#'):

  nuke.pluginAddPath('scriptCleanup')

 

version info:

v1.1

Make ready for Nuke11

v1.0

Initial release

 

Please note: This is tool is legacy code. Although it works as expected, it does not reflect my coding level and coding style. This code needs to be updated in the future, but I haven't found time to do so, yet.

 

Bildschirmfoto 2016-03-31 um 19.13.41

Bildschirmfoto 2016-03-31 um 19.12.05

Sign in or register to download or rate.