title: Maya Python Playblast Progress Bar
body: <p>I have created a script that does playblast, I have made a little Ui also for that just to show the progress of the playblast, but I am unable to figure out how to bind that progress bar with the script, thus asking for little help here.</p>
  <p>Here is the Playblast Script</p>
  <pre class="lang-py prettyprint-override"><code>import maya.cmds as cmds
  import os
  srtfrm = cmds.getAttr('defaultRenderGlobals.startFrame')
  endfrm = cmds.getAttr('defaultRenderGlobals.endFrame')
  filePath = cmds.file(q=True, sn=True)
  fileName = os.path.basename(filePath)
  plbPath = filePath.replace(fileName,&quot;&quot;)
  cmds.playblast(f=plbPath+fileName[:-3], fo=True, fmt='qt', c='H.264', w=1280, h=720, p=100, qlt=100, orn=False, st=srtfrm, et=endfrm, v=False, os=True)
  </code></pre>
  <p>And Here Is the UI</p>
  <pre class="lang-py prettyprint-override"><code>import maya.cmds as cmds
  winID= 'PlayblastUI'
  if cmds.window(winID, exists=True):
      cmds.deleteUI(winID)
  window = cmds.window(winID, title='Make Playblast', resizeToFitChildren=True, sizeable=False, tlb=True )
  cmds.columnLayout()
  progressControl = cmds.progressBar(maxValue=100, width=325)
  cmds.setParent('..')
  cmds.rowColumnLayout(numberOfRows=1,rowHeight=(5,5))
  cmds.setParent('..')
  cmds.rowLayout(numberOfColumns=2)
  cmds.button( label='Playblast', w = 200, command='cmds.progressBar(progressControl, edit=True, step=1)' )
  cmds.text(label='     AnD CGI © 2020', font='smallPlainLabelFont')
  cmds.setParent('..')
  cmds.showWindow()
  </code></pre>