src/jmLightToolkit.py
def muteLights(self):
        """ Put lights selected in 'muted lights' display layer.

            Returns:
                (list): Muted lights.
        """
        is_hierarchy = self.pushButton_soloLights_hierarchy.isChecked()
        lights = self._onlyLightsFromSelection(all_hierachy=is_hierarchy)

        # Return if list is empty
        if not lights:
            return None

        # Create Display layer either get it
        if pm.objExists(self.muted_layer_name):
            pm.PyNode(self.muted_layer_name).addMembers(lights)
        else:
            pm.select(clear=True)
            muted_layer = pm.createDisplayLayer(n=self.muted_layer_name)
            muted_layer.addMembers(lights)
            muted_layer.color.set(21)
            muted_layer.visibility.set(0)

        self.__soloMuteLightsCSS()
        _logger.info("Lights muted : %s" % [lgt.name() for lgt in lights])
        return lights
 Put lights selected in 'muted lights' display layer.

            Returns:
                (list): Muted lights.
        
Put lights selected in 'muted lights' display layer.
Put lights selected in ' muted lights ' display layer .
def muteLights(self):
        is_hierarchy = self.pushButton_soloLights_hierarchy.isChecked()
        lights = self._onlyLightsFromSelection(all_hierachy=is_hierarchy)
        if not lights:
            return None
        if pm.objExists(self.muted_layer_name):
            pm.PyNode(self.muted_layer_name).addMembers(lights)
        else:
            pm.select(clear=True)
            muted_layer = pm.createDisplayLayer(n=self.muted_layer_name)
            muted_layer.addMembers(lights)
            muted_layer.color.set(21)
            muted_layer.visibility.set(0)
        self.__soloMuteLightsCSS()
        _logger.info("Lights muted : %s" % [lgt.name() for lgt in lights])
        return lights
def muteLights ( self ) : is_hierarchy = self . pushButton_soloLights_hierarchy . isChecked ( ) lights = self . _onlyLightsFromSelection ( all_hierachy = is_hierarchy ) if not lights : return None if pm . objExists ( self . muted_layer_name ) : pm . PyNode ( self . muted_layer_name ) . addMembers ( lights ) else : pm . select ( clear = True ) muted_layer = pm . createDisplayLayer ( n = self . muted_layer_name ) muted_layer . addMembers ( lights ) muted_layer . color . set ( 21 ) muted_layer . visibility . set ( 0 ) self . __soloMuteLightsCSS ( ) _logger . info ( "Lights muted : %s" % [ lgt . name ( ) for lgt in lights ] ) return lights
Put lights selected in 'muted lights' display layer.
Put lights selected in ' muted lights ' display layer .
""" Put lights selected in 'muted lights' display layer.

            Returns:
                (list): Muted lights.
        """ # Return if list is empty # Create Display layer either get it
None
(list)
self