I have created a very basic tool that will create a playblast with all the 
desired settings, now all I need to do is to attach with a progress bar.

Can someone help me with how to do it?

Here is the Playblast Script

import maya.cmds as cmds
import os
srtfrm = cmds.getAttr('defaultRenderGlobals.startFrame')
endfrm = cmds.getAttr('defaultRenderGlobals.endFrame')
cmds.playblast(f=test, 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)

Here is the Progress Bar

import maya.cmds as cmds
srtfrm = cmds.getAttr('defaultRenderGlobals.startFrame')
endfrm = cmds.getAttr('defaultRenderGlobals.endFrame')
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=endfrm-srtfrm, 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='           © 2020', font='smallPlainLabelFont')
cmds.setParent('..')
cmds.showWindow()

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/c716dbac-f59f-4a4b-9c54-e906bce847cbn%40googlegroups.com.

Reply via email to