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))
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)) ]
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
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
def deformer(*args, **kwargs): return [_general.PyNode(x) for x in cmds.deformer(*args, **kwargs)]
def shadingNode(*args, **kwargs): res = cmds.shadingNode(*args, **kwargs) if res is not None: return _general.PyNode(res)