Skip to content

Instantly share code, notes, and snippets.

@maty974
Created April 3, 2012 15:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maty974/99d41786f1dc5f1b729c to your computer and use it in GitHub Desktop.
Save maty974/99d41786f1dc5f1b729c to your computer and use it in GitHub Desktop.
Hide all Nuke Viwer Qt Infos Widgets
def hideAllViewerQtInfosWidgets():
try:
import PySide.QtGui as QtGui
parentApp = QtGui.QApplication.allWidgets()
parentName = "Viewer"
name = "/"
parentViewer = None
for parent in parentApp:
for child in parent.children():
try:
if child.text() == name:
parentViewer = child.parent().parent().parent()
if parentName in parentViewer.objectName():
if child.parent().parent().parent().metaObject().className() == "Viewer_Window":
child.setChecked(True)
break
except:
pass
except Exception, e:
print "ERROR:", e
@maty974
Copy link
Author

maty974 commented Apr 3, 2012

add it to contextual menu of Viewer:

viewerMenu = nuke.menu("Viewer")
viewerMenu.addSeparator()
viewerMenu.addCommand("Hide all Qt Infos Widgets", hideAllViewerQtInfosWidgets)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment