I don't have time to write it, but I would say you need to write a function
for progressbar that wil be driven by event, frame change(not really name
of an event), use scriptJob for that and function should give you just
animation percentage of current frame and returned value will be set by
progressbar edit. I think that when you playblast maya freezes, same as
sims. only expressions and scriptJobs could be live.
Or just create an expression for it and after blast delete it.

st 17. 3. 2021 o 20:42 Dhruba Jyoti <vfx.djdh...@gmail.com> napísal(a):

> 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
> <https://groups.google.com/d/msgid/python_inside_maya/c716dbac-f59f-4a4b-9c54-e906bce847cbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEUzAD2KgN%2BDPraVsOhors9p_SJTm7Whp3N3%3Dq873-N-637XHw%40mail.gmail.com.

Reply via email to