Ejemplo n.º 1
0
def ui():
    '''
    User interface for ml_tangentWeight
    '''

    with utl.MlUi(
            'ml_tangentWeight',
            'Weight Keyframe Tangents',
            width=400,
            height=140,
            info=
            '''Increase or decrease tangents length without affecting tangent angle.
Select keyframes and press buttons to weight their tangents.
If no keys are selected, the keys on the current frame will be affected.'''
    ) as win:

        form = mc.formLayout()
        b11 = win.buttonWithPopup(label='-',
                                  command=minus,
                                  annotation='Scale tangent down.')
        b12 = win.buttonWithPopup(label='+',
                                  command=plus,
                                  annotation='Scale tangent up.')
        b21 = win.buttonWithPopup(label='<',
                                  command=sharkFinLeft,
                                  annotation='Weight tangent toward the left.')
        b22 = win.buttonWithPopup(
            label='>',
            command=sharkFinRight,
            annotation='Weight tangent toward the right.')

        utl.formLayoutGrid(form, ((b11, b12), (b21, b22)))
Ejemplo n.º 2
0
def ui():
    '''
    User interface for graph editor mask
    '''

    with utl.MlUi('ml_graphEditorMask', 'Graph Editor Mask', width=400, height=120, info='''Quickly mask the curves visible in the graph editor.
''') as win:
        
        #check box to cull selection to what's visible.
        
        form = mc.formLayout()
        b11 = win.buttonWithPopup(label='Channel Box', command=channelBox, annotation='Isolate curves based on channels highlighted in the channel box')
        b12 = win.buttonWithPopup(label='Selected', command=selected, annotation='Isolate the selected curves')
        b13 = win.buttonWithPopup(label='All', command=showAll, annotation='Show all animation curves')
        b21 = win.buttonWithPopup(label='Translate', command=translate, annotation='Isolate translation curves')
        b22 = win.buttonWithPopup(label='Rotate', command=rotate, annotation='Isolate rotation curves')
        b23 = win.buttonWithPopup(label='Scale', command=scale, annotation='Isolate scale curves')
        b31 = win.buttonWithPopup(label='X', command=x, annotation='Isolate X axis curves')
        b32 = win.buttonWithPopup(label='Y', command=y, annotation='Isolate Y axis curves')
        b33 = win.buttonWithPopup(label='Z', command=z, annotation='Isolate Z axis curves')

        utl.formLayoutGrid(form, (
            (b11,b21,b31),
            (b12,b22,b32),
            (b13,b23,b33)
            ))
Ejemplo n.º 3
0
def ui():
    '''
    User interface for graph editor mask
    '''

    with utl.MlUi('ml_graphEditorMask',
                  'Graph Editor Mask',
                  width=400,
                  height=120,
                  info='''Quickly mask the curves visible in the graph editor.
''') as win:

        #check box to cull selection to what's visible.

        form = mc.formLayout()
        b11 = win.buttonWithPopup(
            label='Channel Box',
            command=channelBox,
            annotation=
            'Isolate curves based on channels highlighted in the channel box')
        b12 = win.buttonWithPopup(label='Selected',
                                  command=selected,
                                  annotation='Isolate the selected curves')
        b13 = win.buttonWithPopup(label='All',
                                  command=showAll,
                                  annotation='Show all animation curves')
        b21 = win.buttonWithPopup(label='Translate',
                                  command=translate,
                                  annotation='Isolate translation curves')
        b22 = win.buttonWithPopup(label='Rotate',
                                  command=rotate,
                                  annotation='Isolate rotation curves')
        b23 = win.buttonWithPopup(label='Scale',
                                  command=scale,
                                  annotation='Isolate scale curves')
        b31 = win.buttonWithPopup(label='X',
                                  command=x,
                                  annotation='Isolate X axis curves')
        b32 = win.buttonWithPopup(label='Y',
                                  command=y,
                                  annotation='Isolate Y axis curves')
        b33 = win.buttonWithPopup(label='Z',
                                  command=z,
                                  annotation='Isolate Z axis curves')

        #b41 = win.buttonWithPopup(label='null', command=z, annotation='Isolate Z axis curves')
        #b42 = win.buttonWithPopup(label='TRS', command=z, annotation='Isolate Z axis curves')
        #b43 = win.buttonWithPopup(label='Custom', command=z, annotation='Isolate Z axis curves')

        utl.formLayoutGrid(form,
                           ((b11, b21, b31), (b12, b22, b32), (b13, b23, b33)))
Ejemplo n.º 4
0
def mini():
    name = 'ml_arcTracer_win_mini'
    w = 100
    h = 50
    if mc.window(name, exists=True):
        mc.deleteUI(name)
    win = mc.window(name, width=w, height=h, title='arcs', iconName='arc')
    form = mc.formLayout()

    a1 = mc.button(label='camera', command=traceCamera)
    a2 = mc.button(label='world', command=traceWorld)
    b1 = mc.button(label='retrace', command=retraceArc)
    b2 = mc.button(label='clear', command=clearArcs)

    utl.formLayoutGrid(form, [[a1,a2],[b1,b2]], )

    mc.showWindow(win)
    mc.window(win, edit=True, width=w, height=h)
Ejemplo n.º 5
0
def ui():
    '''
    User interface for ml_tangentWeight
    '''

    with utl.MlUi('ml_tangentWeight', 'Weight Keyframe Tangents', width=400, height=140, 
                  info='''Increase or decrease tangents length without affecting tangent angle.
Select keyframes and press buttons to weight their tangents.
If no keys are selected, the keys on the current frame will be affected.''') as win:

        form = mc.formLayout()
        b11 = win.buttonWithPopup(label='-', command=minus, annotation='Scale tangent down.')
        b12 = win.buttonWithPopup(label='+', command=plus, annotation='Scale tangent up.')
        b21 = win.buttonWithPopup(label='<', command=sharkFinLeft, annotation='Weight tangent toward the left.')
        b22 = win.buttonWithPopup(label='>', command=sharkFinRight, annotation='Weight tangent toward the right.')

        utl.formLayoutGrid(form, (
            (b11,b12),
            (b21,b22)
            ))
Ejemplo n.º 6
0
def ui():
    '''
    User interface for ml_lockAndHideAttributes
    '''

    with utl.MlUi('ml_lockAndHideAttributes', 'Lock and Hide', width=400, height=140, info='''Select channels in the channel box to be locked or hidden.
then hit the appropriate button.''') as win:

        form = mc.formLayout()
        b11 = win.buttonWithPopup(label='Lock', command=lock, annotation='Lock selected attributes.')
        b12 = win.buttonWithPopup(label='Hide', command=hide, annotation='Hide selected attributes.')
        b13 = win.buttonWithPopup(label='Lock and Hide', command=lockAndHide, annotation='Lock and hide selected attributes.')
        b21 = win.buttonWithPopup(label='Unlock', command=unlock, annotation='Unlock selected attributes.')
        b22 = win.buttonWithPopup(label='Unhide', command=unhide, annotation='Unhide all core attributes.')
        b23 = win.buttonWithPopup(label='Unlock and Unhide', command=unlockAndUnhide, annotation='Unlock and unhide selected attributes.')

        utl.formLayoutGrid(form, (
            (b11,b21),
            (b12,b22),
            (b13,b23)
            ))
Ejemplo n.º 7
0
def ui():
    '''
    User interface for ml_lockAndHideAttributes
    '''

    with utl.MlUi('ml_lockAndHideAttributes', 'Lock and Hide', width=400, height=140, info='''Select channels in the channel box to be locked or hidden.
then hit the appropriate button.''') as win:

        form = mc.formLayout()
        b11 = win.buttonWithPopup(label='Lock', command=lock, annotation='Lock selected attributes.')
        b12 = win.buttonWithPopup(label='Hide', command=hide, annotation='Hide selected attributes.')
        b13 = win.buttonWithPopup(label='Lock and Hide', command=lockAndHide, annotation='Lock and hide selected attributes.')
        b21 = win.buttonWithPopup(label='Unlock', command=unlock, annotation='Unlock selected attributes.')
        b22 = win.buttonWithPopup(label='Unhide', command=unhide, annotation='Unhide all core attributes.')
        b23 = win.buttonWithPopup(label='Unlock and Unhide', command=unlockAndUnhide, annotation='Unlock and unhide selected attributes.')

        utl.formLayoutGrid(form, (
            (b11,b21),
            (b12,b22),
            (b13,b23)
            ))