예제 #1
0
파일: rendering.py 프로젝트: vondras/pymel
def spotLight(*args, **kwargs):
    """
    Maya Bug Fix:
      - name flag was ignored
    """
    if kwargs.get('query', kwargs.get('q', False)) or kwargs.get(
            'edit', kwargs.get('e', False)):
        return cmds.spotLight(*args, **kwargs)

    else:
        name = kwargs.pop('name', kwargs.pop('n', False))
        if name:
            tmp = cmds.spotLight(*args, **kwargs)
            tmp = cmds.rename(cmds.listRelatives(tmp, parent=1)[0], name)
            return _general.PyNode(cmds.listRelatives(tmp, shapes=1)[0])

    return _general.PyNode(cmds.spotLight(*args, **kwargs))
예제 #2
0
파일: animation.py 프로젝트: zewt/pymel
def listAnimatable(*args, **kwargs):
    """
    Modifications:
        - returns an empty list when the result is None
        - returns wrapped classes
    """
    return [
        _general.PyNode(x)
        for x in _util.listForNone(cmds.listAnimatable(*args, **kwargs))
    ]
예제 #3
0
def surface(*args, **kwargs):
    """
    Maya Bug Fix:
      - name parameter only applied to transform. now applies to shape as well
    """
    # surface returns a shape
    name = kwargs.pop('name', kwargs.pop('n', None))
    res = _general.PyNode(cmds.surface(*args, **kwargs))
    if name:
        res.getParent().rename(name)
    return res
예제 #4
0
def curve(*args, **kwargs):
    """
    Maya Bug Fix:
      - name parameter only applied to transform. now applies to shape as well
    """
    # curve returns a transform
    name = kwargs.pop('name', kwargs.pop('n', None))
    res = _general.PyNode(cmds.curve(*args, **kwargs))
    if name:
        res.rename(name)
    return res
예제 #5
0
파일: animation.py 프로젝트: zewt/pymel
def deformer(*args, **kwargs):
    return [_general.PyNode(x) for x in cmds.deformer(*args, **kwargs)]
예제 #6
0
파일: rendering.py 프로젝트: vondras/pymel
def shadingNode(*args, **kwargs):
    res = cmds.shadingNode(*args, **kwargs)
    if res is not None:
        return _general.PyNode(res)