# AUTOMATICALLY GENERATED by `shtab`

_shtab_tyro_ns_render_mesh_subparsers=('nerfstudio-data' 'mipnerf360-data' 'blender-data' 'friends-data' 'instant-ngp-data' 'record3d-data' 'dnerf-data' 'phototourism-data' 'monosdf-data' 'sdfstudio-data' 'heritage-data')

_shtab_tyro_ns_render_mesh_option_strings=('-h' '--help' '--meshfile' '--rendered-output-names' '--traj' '--downscale-factor' '--camera-path-filename' '--output-path' '--seconds' '--fps' '--output-format' '--merge-type' '--num-views')
_shtab_tyro_ns_render_mesh_nerfstudio_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--downscale-factor' '--scene-scale' '--orientation-method' '--center-poses' '--no-center-poses' '--auto-scale-poses' '--no-auto-scale-poses' '--train-split-percentage' '--use-all-train-images' '--no-use-all-train-images')
_shtab_tyro_ns_render_mesh_mipnerf360_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--downscale-factor' '--scene-scale' '--orientation-method' '--center-poses' '--no-center-poses' '--auto-scale-poses' '--no-auto-scale-poses' '--eval-interval')
_shtab_tyro_ns_render_mesh_blender_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--alpha-color')
_shtab_tyro_ns_render_mesh_friends_data_option_strings=('-h' '--help' '--_target' '--data' '--include-semantics' '--no-include-semantics' '--downscale-factor' '--scene-scale')
_shtab_tyro_ns_render_mesh_instant_ngp_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--scene-scale')
_shtab_tyro_ns_render_mesh_record3d_data_option_strings=('-h' '--help' '--_target' '--data' '--val-skip' '--aabb-scale' '--orientation-method' '--max-dataset-size')
_shtab_tyro_ns_render_mesh_dnerf_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--alpha-color')
_shtab_tyro_ns_render_mesh_phototourism_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--alpha-color' '--train-split-percentage' '--scene-scale' '--orientation-method' '--auto-scale-poses' '--no-auto-scale-poses' '--center-poses' '--no-center-poses')
_shtab_tyro_ns_render_mesh_monosdf_data_option_strings=('-h' '--help' '--_target' '--data' '--include-mono-prior' '--no-include-mono-prior' '--downscale-factor' '--scene-scale' '--center-crop-type' '--load-pairs' '--no-load-pairs' '--neighbors-num' '--neighbors-shuffle' '--pairs-sorted-ascending')
_shtab_tyro_ns_render_mesh_sdfstudio_data_option_strings=('-h' '--help' '--_target' '--data' '--include-mono-prior' '--no-include-mono-prior' '--include-sensor-depth' '--no-include-sensor-depth' '--include-foreground-mask' '--no-include-foreground-mask' '--include-sfm-points' '--no-include-sfm-points' '--scale-factor' '--orientation-method' '--center-poses' '--no-center-poses' '--auto-scale-poses' '--no-auto-scale-poses' '--load-pairs' '--no-load-pairs' '--neighbors-num' '--neighbors-shuffle' '--pairs-sorted-ascending' '--skip-every-for-val-split' '--train-val-no-overlap' '--no-train-val-no-overlap' '--auto-orient' '--no-auto-orient' '--load-dtu-highres' '--no-load-dtu-highres')
_shtab_tyro_ns_render_mesh_heritage_data_option_strings=('-h' '--help' '--_target' '--data' '--scale-factor' '--alpha-color' '--train-split-percentage' '--scene-scale' '--orientation-method' '--auto-scale-poses' '--no-auto-scale-poses' '--center-poses' '--no-center-poses')

_shtab_tyro_ns_render_mesh___meshfile_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh___camera_path_filename_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh___output_path_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_nerfstudio_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_mipnerf360_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_blender_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_friends_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_instant_ngp_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_record3d_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_dnerf_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_phototourism_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_monosdf_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_sdfstudio_data___data_COMPGEN=_shtab_compgen_files
_shtab_tyro_ns_render_mesh_heritage_data___data_COMPGEN=_shtab_compgen_files

_shtab_tyro_ns_render_mesh_pos_0_choices=('nerfstudio-data' 'mipnerf360-data' 'blender-data' 'friends-data' 'instant-ngp-data' 'record3d-data' 'dnerf-data' 'phototourism-data' 'monosdf-data' 'sdfstudio-data' 'heritage-data')
_shtab_tyro_ns_render_mesh___traj_choices=('filename' 'spiral' 'ellipse' 'interpolate')
_shtab_tyro_ns_render_mesh___output_format_choices=('images' 'video')
_shtab_tyro_ns_render_mesh___merge_type_choices=('half' 'concat')
_shtab_tyro_ns_render_mesh_nerfstudio_data___orientation_method_choices=('none' 'pca' 'up')
_shtab_tyro_ns_render_mesh_mipnerf360_data___orientation_method_choices=('none' 'pca' 'up')
_shtab_tyro_ns_render_mesh_record3d_data___orientation_method_choices=('pca' 'up')
_shtab_tyro_ns_render_mesh_phototourism_data___orientation_method_choices=('none' 'pca' 'up')
_shtab_tyro_ns_render_mesh_monosdf_data___center_crop_type_choices=('center_crop_for_dtu' 'center_crop_for_replica' 'no_crop' 'center_crop_for_tnt')
_shtab_tyro_ns_render_mesh_sdfstudio_data___orientation_method_choices=('none' 'up')
_shtab_tyro_ns_render_mesh_heritage_data___orientation_method_choices=('none' 'pca' 'up')

_shtab_tyro_ns_render_mesh_pos_0_nargs=A...
_shtab_tyro_ns_render_mesh__h_nargs=0
_shtab_tyro_ns_render_mesh___help_nargs=0
_shtab_tyro_ns_render_mesh___rendered_output_names_nargs=*
_shtab_tyro_ns_render_mesh_nerfstudio_data__h_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___help_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___center_poses_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___no_center_poses_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___no_auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___use_all_train_images_nargs=0
_shtab_tyro_ns_render_mesh_nerfstudio_data___no_use_all_train_images_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data__h_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data___help_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data___center_poses_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data___no_center_poses_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data___auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_mipnerf360_data___no_auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_blender_data__h_nargs=0
_shtab_tyro_ns_render_mesh_blender_data___help_nargs=0
_shtab_tyro_ns_render_mesh_friends_data__h_nargs=0
_shtab_tyro_ns_render_mesh_friends_data___help_nargs=0
_shtab_tyro_ns_render_mesh_friends_data___include_semantics_nargs=0
_shtab_tyro_ns_render_mesh_friends_data___no_include_semantics_nargs=0
_shtab_tyro_ns_render_mesh_instant_ngp_data__h_nargs=0
_shtab_tyro_ns_render_mesh_instant_ngp_data___help_nargs=0
_shtab_tyro_ns_render_mesh_record3d_data__h_nargs=0
_shtab_tyro_ns_render_mesh_record3d_data___help_nargs=0
_shtab_tyro_ns_render_mesh_dnerf_data__h_nargs=0
_shtab_tyro_ns_render_mesh_dnerf_data___help_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data__h_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data___help_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data___auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data___no_auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data___center_poses_nargs=0
_shtab_tyro_ns_render_mesh_phototourism_data___no_center_poses_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data__h_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data___help_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data___include_mono_prior_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data___no_include_mono_prior_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data___load_pairs_nargs=0
_shtab_tyro_ns_render_mesh_monosdf_data___no_load_pairs_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data__h_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___help_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___include_mono_prior_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_include_mono_prior_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___include_sensor_depth_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_include_sensor_depth_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___include_foreground_mask_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_include_foreground_mask_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___include_sfm_points_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_include_sfm_points_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___center_poses_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_center_poses_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___load_pairs_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_load_pairs_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___train_val_no_overlap_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_train_val_no_overlap_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___auto_orient_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_auto_orient_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___load_dtu_highres_nargs=0
_shtab_tyro_ns_render_mesh_sdfstudio_data___no_load_dtu_highres_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data__h_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data___help_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data___auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data___no_auto_scale_poses_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data___center_poses_nargs=0
_shtab_tyro_ns_render_mesh_heritage_data___no_center_poses_nargs=0


# $1=COMP_WORDS[1]
_shtab_compgen_files() {
  compgen -f -- $1  # files
}

# $1=COMP_WORDS[1]
_shtab_compgen_dirs() {
  compgen -d -- $1  # recurse into subdirs
}

# $1=COMP_WORDS[1]
_shtab_replace_nonword() {
  echo "${1//[^[:word:]]/_}"
}

# set default values (called for the initial parser & any subparsers)
_set_parser_defaults() {
  local subparsers_var="${prefix}_subparsers[@]"
  sub_parsers=${!subparsers_var-}

  local current_option_strings_var="${prefix}_option_strings[@]"
  current_option_strings=${!current_option_strings_var}

  completed_positional_actions=0

  _set_new_action "pos_${completed_positional_actions}" true
}

# $1=action identifier
# $2=positional action (bool)
# set all identifiers for an action's parameters
_set_new_action() {
  current_action="${prefix}_$(_shtab_replace_nonword $1)"

  local current_action_compgen_var=${current_action}_COMPGEN
  current_action_compgen="${!current_action_compgen_var-}"

  local current_action_choices_var="${current_action}_choices[@]"
  current_action_choices="${!current_action_choices_var-}"

  local current_action_nargs_var="${current_action}_nargs"
  if [ -n "${!current_action_nargs_var-}" ]; then
    current_action_nargs="${!current_action_nargs_var}"
  else
    current_action_nargs=1
  fi

  current_action_args_start_index=$(( $word_index + 1 ))

  current_action_is_positional=$2
}

# Notes:
# `COMPREPLY`: what will be rendered after completion is triggered
# `completing_word`: currently typed word to generate completions for
# `${!var}`: evaluates the content of `var` and expand its content as a variable
#     hello="world"
#     x="hello"
#     ${!x} -> ${hello} -> "world"
_shtab_tyro_ns_render_mesh() {
  local completing_word="${COMP_WORDS[COMP_CWORD]}"
  COMPREPLY=()

  local prefix=_shtab_tyro_ns_render_mesh
  local word_index=0
  _set_parser_defaults
  word_index=1

  # determine what arguments are appropriate for the current state
  # of the arg parser
  while [ $word_index -ne $COMP_CWORD ]; do
    local this_word="${COMP_WORDS[$word_index]}"

    if [[ -n $sub_parsers && " ${sub_parsers[@]} " == *" ${this_word} "* ]]; then
      # valid subcommand: add it to the prefix & reset the current action
      prefix="${prefix}_$(_shtab_replace_nonword $this_word)"
      _set_parser_defaults
    fi

    if [[ " ${current_option_strings[@]} " == *" ${this_word} "* ]]; then
      # a new action should be acquired (due to recognised option string or
      # no more input expected from current action);
      # the next positional action can fill in here
      _set_new_action $this_word false
    fi

    if [[ "$current_action_nargs" != "*" ]] && \
       [[ "$current_action_nargs" != "+" ]] && \
       [[ "$current_action_nargs" != *"..." ]] && \
       (( $word_index + 1 - $current_action_args_start_index >= \
          $current_action_nargs )); then
      $current_action_is_positional && let "completed_positional_actions += 1"
      _set_new_action "pos_${completed_positional_actions}" true
    fi

    let "word_index+=1"
  done

  # Generate the completions

  if [[ "${completing_word}" == -* ]]; then
    # optional argument started: use option strings
    COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
  else
    # use choices & compgen
    local IFS=$'\n' # items may contain spaces, so delimit using newline
    COMPREPLY=( $([ -n "${current_action_compgen}" ] \
                  && "${current_action_compgen}" "${completing_word}") )
    unset IFS
    COMPREPLY+=( $(compgen -W "${current_action_choices[*]}" -- "${completing_word}") )
  fi

  return 0
}

complete -o filenames -F _shtab_tyro_ns_render_mesh ns-render-mesh
