def ambientLight(*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.ambientLight(*args, **kwargs) else: name = kwargs.pop('name', kwargs.pop('n', False)) if name: tmp = cmds.ambientLight(*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.ambientLight(*args, **kwargs))
def ambientLight(*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.ambientLight(*args, **kwargs) else: name = kwargs.pop('name', kwargs.pop('n', False ) ) if name: tmp = cmds.ambientLight(*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.ambientLight(*args, **kwargs) )