parameters: (logdir)
return_statement: return filepaths
docstring: Get all USD file paths within a directory that match naming conventions imposed by Timelapse.
  
          Args:
              logdir (str): root directory where USD timelapse files are written
  
          Returns:
              dict: keyed by tuples (typestr, category, id_within_batch) with values
               containing full USD file paths
docstring_summary: Get all USD file paths within a directory that match naming conventions imposed by Timelapse.
docstring_tokens: Get all USD file paths within a directory that match naming conventions imposed by Timelapse .
function: def get_filepaths(logdir):
          """Get all USD file paths within a directory that match naming conventions imposed by Timelapse.
  
          Args:
              logdir (str): root directory where USD timelapse files are written
  
          Returns:
              dict: keyed by tuples (typestr, category, id_within_batch) with values
               containing full USD file paths
          """
          fname_pattern = '(.*)_([0-9]+).usd'
  
          filepaths = {}
          for typestr in TimelapseParser.__SUPPORTED_TYPES:
              usd_pattern = '{}*.usd'.format(typestr)
              files = glob.glob(os.path.join(logdir, '**', usd_pattern), recursive=True)
  
              if len(files) == 0:
                  logger.info('No checkpoints found for type {}: no files matched pattern {} in {}'.format(
                      typestr, usd_pattern, logdir))
  
              for fpath in files:
                  cat = os.path.dirname(os.path.relpath(fpath, logdir))
                  m = re.match(fname_pattern, os.path.basename(fpath))
                  if m is None:
                      logger.error('USD {} basename does not match pattern {}'.format(
                          fpath, fname_pattern))
                      continue
                  num = int(m.group(2))
                  filepaths[(typestr, cat, num)] = fpath
  
          return filepaths
function_tokens: def get_filepaths ( logdir ) : fname_pattern = '(.*)_([0-9]+).usd' filepaths = { } for typestr in TimelapseParser . __SUPPORTED_TYPES : usd_pattern = '{}*.usd' . format ( typestr ) files = glob . glob ( os . path . join ( logdir , '**' , usd_pattern ) , recursive = True ) if len ( files ) == 0 : logger . info ( 'No checkpoints found for type {}: no files matched pattern {} in {}' . format ( typestr , usd_pattern , logdir ) ) for fpath in files : cat = os . path . dirname ( os . path . relpath ( fpath , logdir ) ) m = re . match ( fname_pattern , os . path . basename ( fpath ) ) if m is None : logger . error ( 'USD {} basename does not match pattern {}' . format ( fpath , fname_pattern ) ) continue num = int ( m . group ( 2 ) ) filepaths [ ( typestr , cat , num ) ] = fpath return filepaths