Created
June 6, 2013 15:24
-
-
Save hogjonny/5722382 to your computer and use it in GitHub Desktop.
This is a test of Gist using some template code for a making progress window in Autodesk Maya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- | |
# test.py | |
# This is a test | |
# version: 0.1 | |
# date: 5/23/2013 | |
# author: jGalloway | |
# ------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------- | |
import maya.cmds as mc | |
amount = 0 | |
myWindow = mc.progressWindow( title='Doing Nothing', | |
progress=amount, | |
status='Sleeping: 0%', | |
isInterruptable=True ) | |
while True : | |
# Check if the dialog has been cancelled | |
if mc.progressWindow( query=True, isCancelled=True ) : | |
break | |
# Check if end condition has been reached | |
if mc.progressWindow( query=True, progress=True ) >= 100 : | |
break | |
amount += 5 | |
mc.progressWindow( edit=True, progress=amount, status=('Sleeping: ' + `amount` + '%' ) ) | |
mc.pause( seconds=1 ) | |
mc.progressWindow(endProgress=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment