This is a software called Nuke. It was created by The Foundry using PySide. The developers left the PySide side open so Artist could write tools for Nuke.
I was able to find the answer I was looking for in a different forum.
I'll post it here if anyone comes searching in the future. The last line is what i was looking for.
Thanks for checking in Anda
def getActiveViewer():
if widget.windowTitle() == nuke.activeViewer().node().name():
return widget
return False
def getViewerWidgets(qtObject, widgetTTSearch):
for c in qtObject.children():
found = getViewerWidgets(c)
if found:return found
try:
tt = c.toolTip().lower()
if tt.startswith(widgetTTSearch):
return c
except:
pass
widgetSearch = "view selection"
viewerWidgets = getViewerWidgets(getActiveViewer(), widgetSearch)
viewerWidgets.menu().actions()[1].trigger()
def getActiveViewer():
for widget in QtGui.QApplication.allWidgets():
if widget.windowTitle() == nuke.activeViewer().node().name():
return widget
return False
def getViewerWidgets(qtObject, widgetTTSearch):
for c in qtObject.children():
found = getViewerWidgets(c)
if found:return found
try:
tt = c.toolTip().lower()
if tt.startswith(widgetTTSearch):
return c
except:
pass
widgetSearch = "view selection"
viewerWidgets = getViewerWidgets(getActiveViewer(), widgetSearch)
viewerWidgets.menu().actions()[1].trigger()
To copy to clipboard, switch view to plain text mode
Bookmarks