Skip to content

Instantly share code, notes, and snippets.

@zclongpop123
Forked from paulwinex/get_nuke_window.py
Created January 19, 2020 05:28
Show Gist options
  • Save zclongpop123/9d7abefd5c776044261ecd34d42fd4e2 to your computer and use it in GitHub Desktop.
Save zclongpop123/9d7abefd5c776044261ecd34d42fd4e2 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