def findAndReload():
'''
find MainWindow amongst all Nuke widgets and reload unless widget already has a settings file
This is for nuke's onScriptSaveCallback for cases where the widget was first called in a deactivated state (from an unsaved nuke script)
and is then saved while the widget is visible.
This is also triggered via onScriptLoad to guarntee refresh when a script is loaded.
'''
for widget in QtGui.QApplication.allWidgets():
if str(widget) == 'OHUfx ToDoList Widget':
if not widget.settingsFile:
widget.rebuildTaskWidgets()
评论列表
文章目录