src/jmLightToolkit.py
def transfertLightLinks(self):
        """ Transfert all links from first light selected to others lights selected. """
        # Get lights selected
        lights = self._onlyLightsFromSelection()

        # Check light selection
        if not lights:
            _logger.warning("Nothing selected")
            return None

        elif len(lights) < 2:
            _logger.warning("Only one light selected")
            return None

        driver = lights[0]
        slaves = lights[1:]

        type_ = ["mesh", "aiStandIn", "pgYetiMaya"]
        object_linked = pm.lightlink(q=True, light=driver)
        sorted_link = [shape for shape in object_linked if pm.nodeType(shape) in type_]

        for slave in slaves:
            object_linked = pm.lightlink(light=slave)
            pm.lightlink(light=slave, object=object_linked, b=True)
            pm.lightlink(light=slave, object=sorted_link, m=True)

        pm.select(slaves)
        _logger.info("Link from %s copyied to %s" % (driver.name(), [slave.name() for slave in slaves]))
        return True
 Transfert all links from first light selected to others lights selected. 
Transfert all links from first light selected to others lights selected.
Transfert all links from first light selected to others lights selected .
def transfertLightLinks(self):
        lights = self._onlyLightsFromSelection()
        if not lights:
            _logger.warning("Nothing selected")
            return None
        elif len(lights) < 2:
            _logger.warning("Only one light selected")
            return None
        driver = lights[0]
        slaves = lights[1:]
        type_ = ["mesh", "aiStandIn", "pgYetiMaya"]
        object_linked = pm.lightlink(q=True, light=driver)
        sorted_link = [shape for shape in object_linked if pm.nodeType(shape) in type_]
        for slave in slaves:
            object_linked = pm.lightlink(light=slave)
            pm.lightlink(light=slave, object=object_linked, b=True)
            pm.lightlink(light=slave, object=sorted_link, m=True)
        pm.select(slaves)
        _logger.info("Link from %s copyied to %s" % (driver.name(), [slave.name() for slave in slaves]))
        return True
def transfertLightLinks ( self ) : lights = self . _onlyLightsFromSelection ( ) if not lights : _logger . warning ( "Nothing selected" ) return None elif len ( lights ) < 2 : _logger . warning ( "Only one light selected" ) return None driver = lights [ 0 ] slaves = lights [ 1 : ] type_ = [ "mesh" , "aiStandIn" , "pgYetiMaya" ] object_linked = pm . lightlink ( q = True , light = driver ) sorted_link = [ shape for shape in object_linked if pm . nodeType ( shape ) in type_ ] for slave in slaves : object_linked = pm . lightlink ( light = slave ) pm . lightlink ( light = slave , object = object_linked , b = True ) pm . lightlink ( light = slave , object = sorted_link , m = True ) pm . select ( slaves ) _logger . info ( "Link from %s copyied to %s" % ( driver . name ( ) , [ slave . name ( ) for slave in slaves ] ) ) return True
Transfert all links from first light selected to others lights selected.
Transfert all links from first light selected to others lights selected .
""" Transfert all links from first light selected to others lights selected. """ # Get lights selected # Check light selection
self