src/jmLightToolkit.py
def selectChildren(self):
        """ Select All tranforms children from selection """
        include = self.lgt_types + ["mesh"]
        selected = pm.selected()

        # Return if selection is empty
        if not selected:
            _logger.warning("Nothing selected")
            return None

        # Get shapes
        out_shapes = []
        for node in selected:
            out_shapes.extend([node for node in node.getChildren(ad=True, s=True)])
            if pm.nodeType(node.name()) in include:
                out_shapes.append(node)

        # Get transform node
        out_transforms = [shape.getParent() for shape in out_shapes]

        pm.select(out_transforms)
        _logger.info("%s selected" % [node.name() for node in out_transforms])
        return out_transforms
 Select All tranforms children from selection 
Select All tranforms children from selection
Select All tranforms children from selection
def selectChildren(self):
        include = self.lgt_types + ["mesh"]
        selected = pm.selected()
        if not selected:
            _logger.warning("Nothing selected")
            return None
        out_shapes = []
        for node in selected:
            out_shapes.extend([node for node in node.getChildren(ad=True, s=True)])
            if pm.nodeType(node.name()) in include:
                out_shapes.append(node)
        out_transforms = [shape.getParent() for shape in out_shapes]
        pm.select(out_transforms)
        _logger.info("%s selected" % [node.name() for node in out_transforms])
        return out_transforms
def selectChildren ( self ) : include = self . lgt_types + [ "mesh" ] selected = pm . selected ( ) if not selected : _logger . warning ( "Nothing selected" ) return None out_shapes = [ ] for node in selected : out_shapes . extend ( [ node for node in node . getChildren ( ad = True , s = True ) ] ) if pm . nodeType ( node . name ( ) ) in include : out_shapes . append ( node ) out_transforms = [ shape . getParent ( ) for shape in out_shapes ] pm . select ( out_transforms ) _logger . info ( "%s selected" % [ node . name ( ) for node in out_transforms ] ) return out_transforms
Select All tranforms children from selection
Select All tranforms children from selection
""" Select All tranforms children from selection """ # Return if selection is empty # Get shapes # Get transform node
self