parameters: (self, item, depth=0, maxDepth=1, childrenToAdd=None)
docstring: Populates the children of the given item in the prim viewer.
             If childrenToAdd is given its a list of prims to add as
             children.
docstring_summary: Populates the children of the given item in the prim viewer.
             If childrenToAdd is given its a list of prims to add as
             children.
docstring_tokens: Populates the children of the given item in the prim viewer . If childrenToAdd is given its a list of prims to add as children .
function: def _populateChildren(self, item, depth=0, maxDepth=1, childrenToAdd=None):
          """Populates the children of the given item in the prim viewer.
             If childrenToAdd is given its a list of prims to add as
             children."""
          if depth < maxDepth and item.prim.IsActive():
              if item.needsChildrenPopulated() or childrenToAdd:
                  # Populate all the children.
                  if not childrenToAdd:
                      childrenToAdd = self._getFilteredChildren(item.prim)
                  item.addChildren([self._populateItem(child, depth+1, maxDepth)
                                                      for child in childrenToAdd])
              elif depth + 1 < maxDepth:
                  # The children already exist but we're recursing deeper.
                  for i in range(item.childCount()):
                      self._populateChildren(item.child(i), depth+1, maxDepth)
function_tokens: def _populateChildren ( self , item , depth = 0 , maxDepth = 1 , childrenToAdd = None ) : if depth < maxDepth and item . prim . IsActive ( ) : if item . needsChildrenPopulated ( ) or childrenToAdd : # Populate all the children. if not childrenToAdd : childrenToAdd = self . _getFilteredChildren ( item . prim ) item . addChildren ( [ self . _populateItem ( child , depth + 1 , maxDepth ) for child in childrenToAdd ] ) elif depth + 1 < maxDepth : # The children already exist but we're recursing deeper. for i in range ( item . childCount ( ) ) : self . _populateChildren ( item . child ( i ) , depth + 1 , maxDepth )