Is it possible to have all the maya commands within a method to be 
integrated into cmds.progressBar?
I am trying to denote the process rather than just using the waitCursor 
icon (as it may be deem as the application hanging)

However I am having issues in incrementing the process.

import maya.mel

def anim_baking(startFrame, endFrame):
    gMainProgressBar = maya.mel.eval('$tmp = $gMainProgressBar')
    cmds.progressBar(
        gMainProgressBar,
        edit=True,
        beginProgress=True,
        isInterruptable=True,
        status='Creating the helpers...',
        maxValue=(endFrame-startFrame))

    selections = cmds.ls(sl=True, l=True)
    
    for sel in selections:
        cmds.progressBar(main_progress_bar, edit=True, step=1)

        # create locators
        ...
        # do the constraints
        ...
        # iterate channels and set some attributes
        ...
        # bake out the locators
        cmds.bakeResults(...)
        # remove the constraints
        ...
        
    cmds.progressBar(gMainProgressBar, edit=True, endProgress=True)

The progress bar and text does shows up in the bottom left hand but the 
progress seemingly only starts at 1-3% (no increments thereafter) and the 
whole bar ends shortly after.

I was hoping something along the line such as, when it creates the 
locators, it will be 5%, when it went to the constraints, it will be 10% 
etc.


-- 
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/149cbf92-a2a3-42b9-b581-055fe25bfa49%40googlegroups.com.

Reply via email to