I am trying to make use of `cmds.progressWindow` during my animation baking 
function.
However, while doing so, it seems that my `cmds.progressWindow` only 
effects after my `cmds.bakeResults`... There is a window popup however, I 
am not seeing any gauge...

Or if there is a way that I can still make use of the progressWindow and 
have it populate by per function?

This is my current code:
def do_bake(self, selections):
    ...
    ...
    cmds.bakeResults(
        (sel_attrs if attr_names else selections),
        hierarchy="both",
        preserveOutsideKeys=True,
        simulation=True,
        time=(init_start, frame_range[1])
    )

    # I tried to do the following
    amount = 0
    for sel in selections:
        if cmds.progressWindow( query=True, isCancelled=True ) :
                break
        # Check if end condition has been reached
        if cmds.progressWindow( query=True, progress=True ) >= 100 :
                break

        amount = amount + 1
        status_msg = "Processing: {0}".format(amount)
        cmds.progressWindow(edit=True, progress=amount, status=status_msg)

    cmds.progressWindow(endProgress=1)


def main():
    cmds.progressWindow(
        title='My Test Window',
        progress=amount,
        status='Processing: 0%',
        isInterruptable=True
    )

    selections = self.check_current_selections()
    parent_constrains = self.do_parent_constrain(selections)
    animation_bake = self.do_bake(selections)



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6e15b594-198d-443b-b1de-384dd8621be6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to