Exemplo n.º 1
0
def tangentConstraint(*args, **kwargs):
    res = _tangentConstraint(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    # unpack create/edit list result
    if isinstance(res, list) and len(res) == 1 and not kwargs.get('query', kwargs.get('q', False)):
        res = res[0]
    return res
Exemplo n.º 2
0
def animLayer(*args, **kwargs):
    res = cmds.animLayer(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    wraps = _factories.simpleCommandWraps['animLayer']
    for func, wrapCondition in wraps:
        if wrapCondition.eval(kwargs):
            res = func(res)
            break
    return res
Exemplo n.º 3
0
def joint(*args, **kwargs):
    res = cmds.joint(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    if isinstance(res, list) and len(res) == 1:
        # unpack for specific query flags
        unpackFlags = {'angleX', 'angleY', 'angleZ', 'ax', 'ay', 'az', 'rad', 'radius', 'stiffnessX', 'stiffnessY', 'stiffnessZ', 'stx', 'sty', 'stz'}
        if kwargs.get('query', kwargs.get('q', False)) and not unpackFlags.isdisjoint(kwargs):
            res = res[0]
    return res
Exemplo n.º 4
0
def blendTwoAttr(*args, **kwargs):
    for flag in ['t', 'time']:
        try:
            rawVal = kwargs[flag]
        except KeyError:
            continue
        else:
            kwargs[flag] = _factories.convertTimeValues(rawVal)
    res = cmds.blendTwoAttr(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 5
0
def skinCluster(*args, **kwargs):
    res = cmds.skinCluster(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    # unpack create/edit list result
    if isinstance(res, list) and len(res) == 1 and not kwargs.get('query', kwargs.get('q', False)):
        res = res[0]
    wraps = _factories.simpleCommandWraps['skinCluster']
    for func, wrapCondition in wraps:
        if wrapCondition.eval(kwargs):
            res = func(res)
            break
    return res
Exemplo n.º 6
0
def imagePlane(*args, **kwargs):
    res = cmds.imagePlane(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    if isinstance(res, list) and len(res) == 1:
        # unpack for specific query flags
        unpackFlags = {
            'c', 'camera', 'h', 'height', 'lookThrough', 'lt', 'maintainRatio',
            'mr', 'showInAllViews', 'sia', 'w', 'width'
        }
        if kwargs.get('query', kwargs.get(
                'q', False)) and not unpackFlags.isdisjoint(kwargs):
            res = res[0]
    return res
Exemplo n.º 7
0
def tension(*args, **kwargs):
    res = cmds.tension(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    if isinstance(res, list) and len(res) == 1:
        if kwargs.get('query', kwargs.get('q', False)):
            # unpack for specific query flags
            unpackFlags = {'en', 'envelope', 'inwardConstraint', 'iwc', 'outwardConstraint', 'owc', 'pbv', 'pinBorderVertices', 'smoothingStep', 'ss'}
            if not unpackFlags.isdisjoint(kwargs):
                res = res[0]
        else:
            # unpack create/edit result
            res = res[0]
    return res
Exemplo n.º 8
0
def camera(*args, **kwargs):
    if len(args):
        doPassSelf = kwargs.pop('passSelf', False)
    else:
        doPassSelf = False
    for key in ['hc', 'homeCommand', 'jc', 'journalCommand']:
        try:
            cb = kwargs[key]
            if callable(cb):
                kwargs[key] = _factories.makeUICallback(cb, args, doPassSelf)
        except KeyError:
            pass
    res = cmds.camera(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 9
0
def controller(*args, **kwargs):
    res = cmds.controller(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 10
0
def transferAttributes(*args, **kwargs):
    res = cmds.transferAttributes(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 11
0
def bezierCurveToNurbs(*args, **kwargs):
    res = cmds.bezierCurveToNurbs(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 12
0
def offsetSurface(*args, **kwargs):
    res = cmds.offsetSurface(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 13
0
def timeEditorTracks(*args, **kwargs):
    res = cmds.timeEditorTracks(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 14
0
def ikHandle(*args, **kwargs):
    res = _ikHandle(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 15
0
def keyingGroup(*args, **kwargs):
    res = cmds.keyingGroup(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 16
0
def fitBspline(*args, **kwargs):
    res = cmds.fitBspline(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 17
0
def editMetadata(*args, **kwargs):
    res = cmds.editMetadata(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 18
0
def polyProjectCurve(*args, **kwargs):
    res = cmds.polyProjectCurve(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 19
0
def globalStitch(*args, **kwargs):
    res = cmds.globalStitch(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 20
0
def polyNormalPerVertex(*args, **kwargs):
    res = cmds.polyNormalPerVertex(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 21
0
def arcLengthDimension(*args, **kwargs):
    res = cmds.arcLengthDimension(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 22
0
def angleBetween(*args, **kwargs):
    res = cmds.angleBetween(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 23
0
def deformableShape(*args, **kwargs):
    res = cmds.deformableShape(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 24
0
def curveIntersect(*args, **kwargs):
    res = cmds.curveIntersect(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 25
0
def dropoffLocator(*args, **kwargs):
    res = cmds.dropoffLocator(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 26
0
def sequenceManager(*args, **kwargs):
    res = cmds.sequenceManager(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 27
0
def jointLattice(*args, **kwargs):
    res = cmds.jointLattice(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 28
0
def textureDeformer(*args, **kwargs):
    res = cmds.textureDeformer(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 29
0
def pairBlend(*args, **kwargs):
    res = cmds.pairBlend(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
Exemplo n.º 30
0
def nurbsToSubdiv(*args, **kwargs):
    res = cmds.nurbsToSubdiv(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res