예제 #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
예제 #2
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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
예제 #4
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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
예제 #6
0
파일: rendering.py 프로젝트: pbiswal/pymel
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
예제 #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
예제 #8
0
파일: rendering.py 프로젝트: pbiswal/pymel
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
예제 #9
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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
예제 #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
예제 #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
예제 #13
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #14
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #15
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #23
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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
예제 #25
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #26
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #27
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #28
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #29
0
파일: animation.py 프로젝트: zewt/pymel
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
예제 #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