src/jmLightToolkit.py
def transfertLightAttrs(self):
        """ Transfert attributes from first light selected to others light(s) selected. """
        # Get lights
        lights = self._onlyLightsFromSelection(get_shapes=True)
        if not lights:
            return None

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

        for attr_ in self.lgt_attrs:
            # Copy attributes
            if pm.objExists("%s.%s" % (driver, attr_)):
                copy_attr = pm.getAttr("%s.%s" % (driver, attr_))
            else:
                continue

            # Set attributes
            for slave in slaves:
                if pm.objExists("%s.%s" % (slave, attr_)):
                    pm.setAttr("%s.%s" % (slave, attr_), copy_attr)

        pm.select(slaves)
        _logger.info("%s attributes transfered to %s" % (driver.name(), [node.name() for node in slaves]))
        return True
 Transfert attributes from first light selected to others light(s) selected. 
Transfert attributes from first light selected to others light(s) selected.
Transfert attributes from first light selected to others light ( s ) selected .
def transfertLightAttrs(self):
        lights = self._onlyLightsFromSelection(get_shapes=True)
        if not lights:
            return None
        driver = lights[0]
        slaves = lights[1:]
        copy_attr = None
        for attr_ in self.lgt_attrs:
            if pm.objExists("%s.%s" % (driver, attr_)):
                copy_attr = pm.getAttr("%s.%s" % (driver, attr_))
            else:
                continue
            for slave in slaves:
                if pm.objExists("%s.%s" % (slave, attr_)):
                    pm.setAttr("%s.%s" % (slave, attr_), copy_attr)
        pm.select(slaves)
        _logger.info("%s attributes transfered to %s" % (driver.name(), [node.name() for node in slaves]))
        return True
def transfertLightAttrs ( self ) : lights = self . _onlyLightsFromSelection ( get_shapes = True ) if not lights : return None driver = lights [ 0 ] slaves = lights [ 1 : ] copy_attr = None for attr_ in self . lgt_attrs : if pm . objExists ( "%s.%s" % ( driver , attr_ ) ) : copy_attr = pm . getAttr ( "%s.%s" % ( driver , attr_ ) ) else : continue for slave in slaves : if pm . objExists ( "%s.%s" % ( slave , attr_ ) ) : pm . setAttr ( "%s.%s" % ( slave , attr_ ) , copy_attr ) pm . select ( slaves ) _logger . info ( "%s attributes transfered to %s" % ( driver . name ( ) , [ node . name ( ) for node in slaves ] ) ) return True
Transfert attributes from first light selected to others light(s) selected.
Transfert attributes from first light selected to others light ( s ) selected .
""" Transfert attributes from first light selected to others light(s) selected. """ # Get lights # Copy attributes # Set attributes
self