parameters: (argsParser, args, frameFormatArgName=None)
return_statement: return args
docstring: Validates the frame-related arguments in args parsed by argsParser.
  
      This populates 'frames' with the appropriate iterable based on the
      command-line arguments given, so it should be called after parse_args() is
      called on argsParser.
  
      When working with frame ranges, particularly when writing out images for
      each frame, it is common to also have command-line arguments such as an
      output image path for specifying where those images should be written. The
      value given to this argument should include a frame placeholder so that it
      can have the appropriate time code inserted. If the application has such an
      argument, its name can be specified using frameFormatArgName. That arg will
      be checked to ensure that it has a frame placeholder and it will be given
      a value with that placeholder replaced with a Python format specifier so
      that the value is ready to use with the str.format(frame=<timeCode>)
      method. If a frame range is not provided as an argument, then it is an
      error to include a frame placeholder in the frame format string.
docstring_summary: Validates the frame-related arguments in args parsed by argsParser.
docstring_tokens: Validates the frame - related arguments in args parsed by argsParser .
function: def ValidateCmdlineArgs(argsParser, args, frameFormatArgName=None):
      """
      Validates the frame-related arguments in args parsed by argsParser.
  
      This populates 'frames' with the appropriate iterable based on the
      command-line arguments given, so it should be called after parse_args() is
      called on argsParser.
  
      When working with frame ranges, particularly when writing out images for
      each frame, it is common to also have command-line arguments such as an
      output image path for specifying where those images should be written. The
      value given to this argument should include a frame placeholder so that it
      can have the appropriate time code inserted. If the application has such an
      argument, its name can be specified using frameFormatArgName. That arg will
      be checked to ensure that it has a frame placeholder and it will be given
      a value with that placeholder replaced with a Python format specifier so
      that the value is ready to use with the str.format(frame=<timeCode>)
      method. If a frame range is not provided as an argument, then it is an
      error to include a frame placeholder in the frame format string.
      """
      from pxr import Usd
  
      framePlaceholder = None
      frameFormat = None
      if frameFormatArgName is not None:
          frameFormat = getattr(args, frameFormatArgName)
          framePlaceholder = GetFramePlaceholder(frameFormat)
          frameFormat = ConvertFramePlaceholderToFloatSpec(frameFormat)
  
      if args.frames:
          args.frames = FrameSpecIterator(args.frames)
  
          if frameFormatArgName is not None:
              if not frameFormat:
                  argsParser.error('%s must contain exactly one frame number '
                      'placeholder of the form "###"" or "###.###". Note that '
                      'the number of hash marks is variable in each group.' %
                      frameFormatArgName)
  
              placeholderPrecision = _GetFloatStringPrecision(framePlaceholder)
  
              if placeholderPrecision < args.frames.minFloatPrecision:
                  argsParser.error('The given FrameSpecs require a minimum '
                      'floating point precision of %d, but the frame '
                      'placeholder in %s only specified a precision of %d (%s). '
                      'The precision of the frame placeholder must be equal to '
                      'or greater than %d.' % (args.frames.minFloatPrecision,
                          frameFormatArgName, placeholderPrecision,
                          framePlaceholder,args.frames.minFloatPrecision))
  
              setattr(args, frameFormatArgName, frameFormat)
      else:
          if frameFormat:
              argsParser.error('%s cannot contain a frame number placeholder '
                  'when not operating on a frame range.' % frameFormatArgName)
  
          if args.defaultTime:
              args.frames = [Usd.TimeCode.Default()]
          else:
              args.frames = [Usd.TimeCode.EarliestTime()]
  
      return args
function_tokens: def ValidateCmdlineArgs ( argsParser , args , frameFormatArgName = None ) : from pxr import Usd framePlaceholder = None frameFormat = None if frameFormatArgName is not None : frameFormat = getattr ( args , frameFormatArgName ) framePlaceholder = GetFramePlaceholder ( frameFormat ) frameFormat = ConvertFramePlaceholderToFloatSpec ( frameFormat ) if args . frames : args . frames = FrameSpecIterator ( args . frames ) if frameFormatArgName is not None : if not frameFormat : argsParser . error ( '%s must contain exactly one frame number ' 'placeholder of the form "###"" or "###.###". Note that ' 'the number of hash marks is variable in each group.' % frameFormatArgName ) placeholderPrecision = _GetFloatStringPrecision ( framePlaceholder ) if placeholderPrecision < args . frames . minFloatPrecision : argsParser . error ( 'The given FrameSpecs require a minimum ' 'floating point precision of %d, but the frame ' 'placeholder in %s only specified a precision of %d (%s). ' 'The precision of the frame placeholder must be equal to ' 'or greater than %d.' % ( args . frames . minFloatPrecision , frameFormatArgName , placeholderPrecision , framePlaceholder , args . frames . minFloatPrecision ) ) setattr ( args , frameFormatArgName , frameFormat ) else : if frameFormat : argsParser . error ( '%s cannot contain a frame number placeholder ' 'when not operating on a frame range.' % frameFormatArgName ) if args . defaultTime : args . frames = [ Usd . TimeCode . Default ( ) ] else : args . frames = [ Usd . TimeCode . EarliestTime ( ) ] return args