parameters: (self, pattern, useRegex=True)
return_statement: return matches
docstring: Search the Usd Stage for matching prims
docstring_summary: Search the Usd Stage for matching prims
docstring_tokens: Search the Usd Stage for matching prims
function: def _findPrims(self, pattern, useRegex=True):
          """Search the Usd Stage for matching prims
          """
          # If pattern doesn't contain regexp special chars, drop
          # down to simple search, as it's faster
          if useRegex and re.match("^[0-9_A-Za-z]+$", pattern):
              useRegex = False
          if useRegex:
              isMatch = re.compile(pattern, re.IGNORECASE).search
          else:
              pattern = pattern.lower()
              isMatch = lambda x: pattern in x.lower()
  
          matches = [prim.GetPath() for prim
                     in Usd.PrimRange.Stage(self._dataModel.stage,
                                               self._displayPredicate)
                     if isMatch(prim.GetName())]
  
          if self._dataModel.viewSettings.showAllPrototypePrims:
              for prototype in self._dataModel.stage.GetPrototypes():
                  matches += [prim.GetPath() for prim
                              in Usd.PrimRange(prototype, self._displayPredicate)
                              if isMatch(prim.GetName())]
  
          return matches
function_tokens: def _findPrims ( self , pattern , useRegex = True ) : # If pattern doesn't contain regexp special chars, drop # down to simple search, as it's faster if useRegex and re . match ( "^[0-9_A-Za-z]+$" , pattern ) : useRegex = False if useRegex : isMatch = re . compile ( pattern , re . IGNORECASE ) . search else : pattern = pattern . lower ( ) isMatch = lambda x : pattern in x . lower ( ) matches = [ prim . GetPath ( ) for prim in Usd . PrimRange . Stage ( self . _dataModel . stage , self . _displayPredicate ) if isMatch ( prim . GetName ( ) ) ] if self . _dataModel . viewSettings . showAllPrototypePrims : for prototype in self . _dataModel . stage . GetPrototypes ( ) : matches += [ prim . GetPath ( ) for prim in Usd . PrimRange ( prototype , self . _displayPredicate ) if isMatch ( prim . GetName ( ) ) ] return matches