Skip to content

Instantly share code, notes, and snippets.

@hogjonny
Created June 6, 2013 15:24
Show Gist options
  • Save hogjonny/5722382 to your computer and use it in GitHub Desktop.
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
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
# 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