def setProgressStatus( status ): if not _progressing: return if _uiProgress: MProgressWindow.setProgressStatus( status ) else: print >> sys.stderr, "### %s" % status
def setProgressStatus(status): if not _progressing: return if _uiProgress: MProgressWindow.setProgressStatus(status) else: print >> sys.stderr, "### %s" % status
def reset( maxRange ): global _uiProgress _uiProgress = (MGlobal.mayaState() == MGlobal.kInteractive) if _uiProgress: MProgressWindow.reserve() MProgressWindow.setProgressRange( 0, maxRange ) MProgressWindow.setProgress( 0 ) MProgressWindow.startProgress() MProgressWindow.setInterruptable( True )
def reset(maxRange): global _uiProgress global _progressing _progressing = True _uiProgress = (MGlobal.mayaState() == MGlobal.kInteractive) if _uiProgress: MProgressWindow.reserve() MProgressWindow.setProgressRange(0, maxRange) MProgressWindow.setProgress(0) MProgressWindow.startProgress() MProgressWindow.setInterruptable(True)
def advanceProgress(progress): if not _progressing: return if _uiProgress: MProgressWindow.advanceProgress(progress) checkForCancel()
def setTitle(title): if not _progressing: return if _uiProgress: MProgressWindow.setTitle(title)
def checkForCancel(): if not _progressing: return if _uiProgress: if MProgressWindow.isCancelled(): raise npy.Errors.AbortError("Operation cancelled by user")
def stop(): global _progressing if _uiProgress: MProgressWindow.endProgress() _progressing = False
def advanceProgress( progress ): if not _progressing: return if _uiProgress: MProgressWindow.advanceProgress( progress ) checkForCancel()
def setTitle( title ): if not _progressing: return if _uiProgress: MProgressWindow.setTitle( title )
def advanceProgress( progress ): if _uiProgress: MProgressWindow.advanceProgress( progress ) checkForCancel()
def setProgress( progress ): if _uiProgress: MProgressWindow.setProgress( progress ) checkForCancel()
def setTitle( title ): if _uiProgress: MProgressWindow.setTitle( title )
def stop(): if _uiProgress: MProgressWindow.endProgress()