Created
April 3, 2012 15:11
-
-
Save maty974/99d41786f1dc5f1b729c to your computer and use it in GitHub Desktop.
Hide all Nuke Viwer Qt Infos Widgets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add it to contextual menu of Viewer:
viewerMenu = nuke.menu("Viewer")
viewerMenu.addSeparator()
viewerMenu.addCommand("Hide all Qt Infos Widgets", hideAllViewerQtInfosWidgets)