def isMayapy(): """Returns True if the current executable is mayapy :return: bool """ if MGlobal.mayaState() == MGlobal.kLibraryApp: return True return False
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)