#compdef ns-render

# AUTOMATICALLY GENERATED by `shtab`


_shtab_tyro_ns_render_commands() {
  local _commands=(
    "camera-path:Render a camera path generated by the viewer or blender add-on."
    "dataset:Render all images in the dataset."
    "interpolate:Render a trajectory that interpolates between training or eval dataset images."
    "spiral:Render a spiral trajectory (often not great)."
  )
  _describe 'ns-render commands' _commands
}

_shtab_tyro_ns_render_options=(
  {-h,--help}"[show this help message and exit]:help:"
)

_shtab_tyro_ns_render_camera_path_options=(
  {-h,--help}"[show this help message and exit]:help:"
  "--load-config[Path to config YAML file. (required)]:load-config:_files"
  "--output-path[Path to output video file. (default\: renders\/output.mp4)]:output-path:_files"
  "--image-format[Image format (default\: jpeg)]:image-format:(jpeg png)"
  "--jpeg-quality[JPEG quality (default\: 100)]:jpeg-quality:"
  "--downscale-factor[Scaling factor to apply to the camera image resolution. (default\: 1.0)]:downscale-factor:"
  "--eval-num-rays-per-chunk[Specifies number of rays per chunk during eval. If None, use the value in the config file. (default\: None)]:eval-num-rays-per-chunk:"
  "--rendered-output-names[Name of the renderer outputs to use. rgb, depth, etc. concatenates them along y axis (default\: rgb)]:rendered-output-names:"
  "--depth-near-plane[Closest depth to consider when using the colormap for depth. If None, use min value. (default\: None)]:depth-near-plane:"
  "--depth-far-plane[Furthest depth to consider when using the colormap for depth. If None, use max value. (default\: None)]:depth-far-plane:"
  "--render-nearest-camera[Whether to render the nearest training camera to the rendered camera. (default\: False)]:render-nearest-camera:(True False)"
  "--check-occlusions[If true, checks line-of-sight occlusions when computing camera distance and rejects cameras not visible to each other (default\: False)]:check-occlusions:(True False)"
  "--camera-idx[Index of the training camera to render. (default\: None)]:camera-idx:"
  "--camera-path-filename[Filename of the camera path to render. (default\: camera_path.json)]:camera-path-filename:_files"
  "--output-format[How to save output data. (default\: video)]:output-format:(images video)"
  "--colormap-options.colormap[The colormap to use (default\: default)]:colormap-options.colormap:(default turbo viridis magma inferno cividis gray pca)"
  "--colormap-options.normalize[Whether to normalize the input tensor image (default\: False)]:colormap-options.normalize:(True False)"
  "--colormap-options.colormap-min[Minimum value for the output colormap (default\: 0)]:colormap-options.colormap-min:"
  "--colormap-options.colormap-max[Maximum value for the output colormap (default\: 1)]:colormap-options.colormap-max:"
  "--colormap-options.invert[Whether to invert the output colormap (default\: False)]:colormap-options.invert:(True False)"
)

_shtab_tyro_ns_render_dataset_options=(
  {-h,--help}"[show this help message and exit]:help:"
  "--load-config[Path to config YAML file. (required)]:load-config:_files"
  "--output-path[Path to output video file. (default\: renders)]:output-path:_files"
  "--image-format[Image format (default\: jpeg)]:image-format:(jpeg png)"
  "--jpeg-quality[JPEG quality (default\: 100)]:jpeg-quality:"
  "--downscale-factor[Scaling factor to apply to the camera image resolution. (default\: None)]:downscale-factor:"
  "--eval-num-rays-per-chunk[Specifies number of rays per chunk during eval. If None, use the value in the config file. (default\: None)]:eval-num-rays-per-chunk:"
  "--rendered-output-names[Name of the renderer outputs to use. rgb, depth, raw-depth, gt-rgb etc. By default all outputs are rendered. (default\: None)]:rendered-output-names:"
  "--depth-near-plane[Closest depth to consider when using the colormap for depth. If None, use min value. (default\: None)]:depth-near-plane:"
  "--depth-far-plane[Furthest depth to consider when using the colormap for depth. If None, use max value. (default\: None)]:depth-far-plane:"
  "--render-nearest-camera[Whether to render the nearest training camera to the rendered camera. (default\: False)]:render-nearest-camera:(True False)"
  "--check-occlusions[If true, checks line-of-sight occlusions when computing camera distance and rejects cameras not visible to each other (default\: False)]:check-occlusions:(True False)"
  "--camera-idx[Index of the training camera to render. (default\: None)]:camera-idx:"
  "--data[Override path to the dataset. (default\: None)]:data:_files"
  "--split[Split to render. (default\: test)]:split:(train val test train+test)"
  "--colormap-options.colormap[The colormap to use (default\: default)]:colormap-options.colormap:(default turbo viridis magma inferno cividis gray pca)"
  "--colormap-options.normalize[Whether to normalize the input tensor image (default\: False)]:colormap-options.normalize:(True False)"
  "--colormap-options.colormap-min[Minimum value for the output colormap (default\: 0)]:colormap-options.colormap-min:"
  "--colormap-options.colormap-max[Maximum value for the output colormap (default\: 1)]:colormap-options.colormap-max:"
  "--colormap-options.invert[Whether to invert the output colormap (default\: False)]:colormap-options.invert:(True False)"
)

_shtab_tyro_ns_render_interpolate_options=(
  {-h,--help}"[show this help message and exit]:help:"
  "--load-config[Path to config YAML file. (required)]:load-config:_files"
  "--output-path[Path to output video file. (default\: renders\/output.mp4)]:output-path:_files"
  "--image-format[Image format (default\: jpeg)]:image-format:(jpeg png)"
  "--jpeg-quality[JPEG quality (default\: 100)]:jpeg-quality:"
  "--downscale-factor[Scaling factor to apply to the camera image resolution. (default\: 1.0)]:downscale-factor:"
  "--eval-num-rays-per-chunk[Specifies number of rays per chunk during eval. If None, use the value in the config file. (default\: None)]:eval-num-rays-per-chunk:"
  "--rendered-output-names[Name of the renderer outputs to use. rgb, depth, etc. concatenates them along y axis (default\: rgb)]:rendered-output-names:"
  "--depth-near-plane[Closest depth to consider when using the colormap for depth. If None, use min value. (default\: None)]:depth-near-plane:"
  "--depth-far-plane[Furthest depth to consider when using the colormap for depth. If None, use max value. (default\: None)]:depth-far-plane:"
  "--render-nearest-camera[Whether to render the nearest training camera to the rendered camera. (default\: False)]:render-nearest-camera:(True False)"
  "--check-occlusions[If true, checks line-of-sight occlusions when computing camera distance and rejects cameras not visible to each other (default\: False)]:check-occlusions:(True False)"
  "--camera-idx[Index of the training camera to render. (default\: None)]:camera-idx:"
  "--pose-source[Pose source to render. (default\: eval)]:pose-source:(eval train)"
  "--interpolation-steps[Number of interpolation steps between eval dataset cameras. (default\: 10)]:interpolation-steps:"
  "--order-poses[Whether to order camera poses by proximity. (default\: False)]:order-poses:(True False)"
  "--frame-rate[Frame rate of the output video. (default\: 24)]:frame-rate:"
  "--output-format[How to save output data. (default\: video)]:output-format:(images video)"
  "--colormap-options.colormap[The colormap to use (default\: default)]:colormap-options.colormap:(default turbo viridis magma inferno cividis gray pca)"
  "--colormap-options.normalize[Whether to normalize the input tensor image (default\: False)]:colormap-options.normalize:(True False)"
  "--colormap-options.colormap-min[Minimum value for the output colormap (default\: 0)]:colormap-options.colormap-min:"
  "--colormap-options.colormap-max[Maximum value for the output colormap (default\: 1)]:colormap-options.colormap-max:"
  "--colormap-options.invert[Whether to invert the output colormap (default\: False)]:colormap-options.invert:(True False)"
)

_shtab_tyro_ns_render_spiral_options=(
  {-h,--help}"[show this help message and exit]:help:"
  "--load-config[Path to config YAML file. (required)]:load-config:_files"
  "--output-path[Path to output video file. (default\: renders\/output.mp4)]:output-path:_files"
  "--image-format[Image format (default\: jpeg)]:image-format:(jpeg png)"
  "--jpeg-quality[JPEG quality (default\: 100)]:jpeg-quality:"
  "--downscale-factor[Scaling factor to apply to the camera image resolution. (default\: 1.0)]:downscale-factor:"
  "--eval-num-rays-per-chunk[Specifies number of rays per chunk during eval. If None, use the value in the config file. (default\: None)]:eval-num-rays-per-chunk:"
  "--rendered-output-names[Name of the renderer outputs to use. rgb, depth, etc. concatenates them along y axis (default\: rgb)]:rendered-output-names:"
  "--depth-near-plane[Closest depth to consider when using the colormap for depth. If None, use min value. (default\: None)]:depth-near-plane:"
  "--depth-far-plane[Furthest depth to consider when using the colormap for depth. If None, use max value. (default\: None)]:depth-far-plane:"
  "--render-nearest-camera[Whether to render the nearest training camera to the rendered camera. (default\: False)]:render-nearest-camera:(True False)"
  "--check-occlusions[If true, checks line-of-sight occlusions when computing camera distance and rejects cameras not visible to each other (default\: False)]:check-occlusions:(True False)"
  "--camera-idx[Index of the training camera to render. (default\: None)]:camera-idx:"
  "--seconds[How long the video should be. (default\: 3.0)]:seconds:"
  "--output-format[How to save output data. (default\: video)]:output-format:(images video)"
  "--frame-rate[Frame rate of the output video (only for interpolate trajectory). (default\: 24)]:frame-rate:"
  "--radius[Radius of the spiral. (default\: 0.1)]:radius:"
  "--colormap-options.colormap[The colormap to use (default\: default)]:colormap-options.colormap:(default turbo viridis magma inferno cividis gray pca)"
  "--colormap-options.normalize[Whether to normalize the input tensor image (default\: False)]:colormap-options.normalize:(True False)"
  "--colormap-options.colormap-min[Minimum value for the output colormap (default\: 0)]:colormap-options.colormap-min:"
  "--colormap-options.colormap-max[Maximum value for the output colormap (default\: 1)]:colormap-options.colormap-max:"
  "--colormap-options.invert[Whether to invert the output colormap (default\: False)]:colormap-options.invert:(True False)"
)


_shtab_tyro_ns_render() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_tyro_ns_render_options[(I)${(q)one_or_more}*]} + ${_shtab_tyro_ns_render_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_tyro_ns_render_options+=(': :_shtab_tyro_ns_render_commands' '*::: :->ns-render')
  fi
  _arguments -C -s $_shtab_tyro_ns_render_options

  case $state in
    ns-render)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_tyro_ns_render-$line[1]:"
      case $line[1] in
        camera-path) _arguments -C -s $_shtab_tyro_ns_render_camera_path_options ;;
        dataset) _arguments -C -s $_shtab_tyro_ns_render_dataset_options ;;
        interpolate) _arguments -C -s $_shtab_tyro_ns_render_interpolate_options ;;
        spiral) _arguments -C -s $_shtab_tyro_ns_render_spiral_options ;;
      esac
  esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef _shtab_tyro_ns_render -N ns-render
else
  # autoload from fpath, call function directly
  _shtab_tyro_ns_render "$@"
fi

