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

            Returns:
                (list): Displayed lights.
        """
        self.restoreLights()
        is_hierarchy = self.pushButton_soloLights_hierarchy.isChecked()
        lights = { "displayed" : self._onlyLightsFromSelection(all_hierachy=is_hierarchy), "muted" : [] }

        # Return if lists them empty
        if not lights["displayed"]:
            return None

        # Get unselected lights
        all_lights = self._getAllLights()
        lights["muted"] = list(set(all_lights).difference(lights["displayed"]))

        # Create Display layer
        pm.select(clear=True)
        muted_layer = pm.createDisplayLayer(n=self.muted_layer_name)
        muted_layer.addMembers(lights["muted"])
        muted_layer.color.set(21)
        muted_layer.visibility.set(0)

        displayed_layer = pm.createDisplayLayer(n=self.displayed_layer_name)
        displayed_layer.addMembers(lights["displayed"])
        displayed_layer.color.set(22)

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

            Returns:
                (list): Displayed lights.
        
Put lights selected in 'displayed lights' display layer.
Put lights selected in ' displayed lights ' display layer .
def soloLights(self):
        self.restoreLights()
        is_hierarchy = self.pushButton_soloLights_hierarchy.isChecked()
        lights = { "displayed" : self._onlyLightsFromSelection(all_hierachy=is_hierarchy), "muted" : [] }
        if not lights["displayed"]:
            return None
        all_lights = self._getAllLights()
        lights["muted"] = list(set(all_lights).difference(lights["displayed"]))
        pm.select(clear=True)
        muted_layer = pm.createDisplayLayer(n=self.muted_layer_name)
        muted_layer.addMembers(lights["muted"])
        muted_layer.color.set(21)
        muted_layer.visibility.set(0)
        displayed_layer = pm.createDisplayLayer(n=self.displayed_layer_name)
        displayed_layer.addMembers(lights["displayed"])
        displayed_layer.color.set(22)
        self.__soloMuteLightsCSS()
        _logger.info("Lights displayed : %s" % [lgt.name() for lgt in lights["displayed"]])
        return lights["displayed"]
def soloLights ( self ) : self . restoreLights ( ) is_hierarchy = self . pushButton_soloLights_hierarchy . isChecked ( ) lights = { "displayed" : self . _onlyLightsFromSelection ( all_hierachy = is_hierarchy ) , "muted" : [ ] } if not lights [ "displayed" ] : return None all_lights = self . _getAllLights ( ) lights [ "muted" ] = list ( set ( all_lights ) . difference ( lights [ "displayed" ] ) ) pm . select ( clear = True ) muted_layer = pm . createDisplayLayer ( n = self . muted_layer_name ) muted_layer . addMembers ( lights [ "muted" ] ) muted_layer . color . set ( 21 ) muted_layer . visibility . set ( 0 ) displayed_layer = pm . createDisplayLayer ( n = self . displayed_layer_name ) displayed_layer . addMembers ( lights [ "displayed" ] ) displayed_layer . color . set ( 22 ) self . __soloMuteLightsCSS ( ) _logger . info ( "Lights displayed : %s" % [ lgt . name ( ) for lgt in lights [ "displayed" ] ] ) return lights [ "displayed" ]
Put lights selected in 'displayed lights' display layer.
Put lights selected in ' displayed lights ' display layer .
""" Put lights selected in 'displayed lights' display layer.

            Returns:
                (list): Displayed lights.
        """ # Return if lists them empty # Get unselected lights # Create Display layer
None
(list)
self