_f3d()
{
    local cur prev opts
    _init_completion || return

    # If current word starts with -, provide option completions
    if [[ $cur == -* ]]; then
        opts="--input --define -D --reset -R --output --output-video --no-background --no-cache --help -h --version --list-readers --force-reader --skip-content-check --list-bindings --config --no-config --no-render --load-statefile --save-statefile --statefile-filename --rendering-backend --list-rendering-backends --list-video-encoders --video-encoder --video-bitrate --video-low-latency --max-size --dpi-aware --watch --frame-rate --load-plugins --plugins-path --scan-plugins --screenshot-filename --verbose --loading-progress --animation-progress --multi-file-mode --multi-file-regex --recursive-dir-add --remove-empty-file-groups --up --axis -x --grid -g --x-color --y-color --z-color --grid-absolute --grid-unit --grid-subdivisions --grid-color --grid-opacity --grid-reflection --axes-grid --edges -e --armature --camera-index --interaction-style -k --invert-zoom --animation-autoplay --animation-indices --animation-speed-factor --animation-time --font-file --font-scale --font-color --backdrop-opacity --backdrop-color --command-script --normal-glyphs --normal-glyphs-scale --point-sprites -o --point-sprites-size --point-sprites-absolute-size --point-size --line-width --backface-type --color --opacity --roughness --metallic --base-ior --hdri-file --hdri-ambient -f --hdri-skybox -j --texture-matcap --texture-base-color --texture-material --texture-emissive --textures-transform --emissive-factor --texture-normal --checkerboard --normal-scale --unlit --background-color --resolution --position --fps -z --filename --metadata -m --scene-hierarchy --notifications --hdri-filename --blur-coc --light-intensity --coloring-mode -s --coloring-array --coloring-component -y --coloring-field --coloring-range --coloring-scalar-bar -b --colormap-file --colormap-discretization --colormap --volume-opacity-map --volume-opacity-file --volume -v --volume-inverse -i --camera-position --camera-focal-point --camera-view-up --camera-view-angle --camera-direction --camera-zoom-factor --camera-azimuth-angle --camera-elevation-angle --camera-orthographic --raytracing -r --raytracing-samples --raytracing-denoise -d --blending -p --ambient-occlusion -q --anti-aliasing -a --tone-mapping -t --final-shader --display-depth --reference --reference-threshold --interaction-test-record --interaction-test-play"
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi

    # For file arguments
    _filedir
} &&
complete -F _f3d f3d
