Skip to content

Instantly share code, notes, and snippets.

@paulwinex
Created May 12, 2016 11:54
Show Gist options
  • Save paulwinex/b00fcff40ee8392d3220990b358d9337 to your computer and use it in GitHub Desktop.
Save paulwinex/b00fcff40ee8392d3220990b358d9337 to your computer and use it in GitHub Desktop.
Get Main Nuke window
from PySide.QtCore import *
from PySide.QtGui import *
app = QApplication.instance()
def getMainWindow():
for widget in app.topLevelWidgets():
if widget.metaObject().className() == 'Foundry::UI::DockMainWindow':
return widget
qNuke =getMainWindow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment