Example #1
0
def setProgressStatus( status ):
	if not _progressing:
		return
	if _uiProgress:
		MProgressWindow.setProgressStatus( status )
	else:
		print >> sys.stderr, "### %s" % status
Example #2
0
def setProgressStatus(status):
    if not _progressing:
        return
    if _uiProgress:
        MProgressWindow.setProgressStatus(status)
    else:
        print >> sys.stderr, "### %s" % status
Example #3
0
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 )
Example #4
0
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)
Example #5
0
def advanceProgress(progress):
    if not _progressing:
        return
    if _uiProgress:
        MProgressWindow.advanceProgress(progress)
        checkForCancel()
Example #6
0
def setTitle(title):
    if not _progressing:
        return
    if _uiProgress:
        MProgressWindow.setTitle(title)
Example #7
0
def checkForCancel():
    if not _progressing:
        return
    if _uiProgress:
        if MProgressWindow.isCancelled():
            raise npy.Errors.AbortError("Operation cancelled by user")
Example #8
0
def stop():
    global _progressing

    if _uiProgress:
        MProgressWindow.endProgress()
    _progressing = False
Example #9
0
def advanceProgress( progress ):
	if not _progressing:
		return
	if _uiProgress:
		MProgressWindow.advanceProgress( progress )
		checkForCancel()
Example #10
0
def setTitle( title ):
	if not _progressing:
		return
	if _uiProgress:
		MProgressWindow.setTitle( title )
Example #11
0
def checkForCancel():
	if not _progressing:
		return
	if _uiProgress:
		if MProgressWindow.isCancelled():
			raise npy.Errors.AbortError("Operation cancelled by user")
Example #12
0
def stop():
	global _progressing

	if _uiProgress:
		MProgressWindow.endProgress()
	_progressing = False
Example #13
0
def advanceProgress( progress ):
	if _uiProgress:
		MProgressWindow.advanceProgress( progress )
		checkForCancel()
Example #14
0
def setProgress( progress ):
	if _uiProgress:
		MProgressWindow.setProgress( progress )
		checkForCancel()
Example #15
0
def setTitle( title ):
	if _uiProgress:
		MProgressWindow.setTitle( title )
Example #16
0
def stop():
	if _uiProgress:
		MProgressWindow.endProgress()