_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 --no-background --help -h --version --list-readers --force-reader --list-bindings --config --no-config --no-render --rendering-backend --list-rendering-backends --max-size --dpi-aware --watch --frame-rate --load-plugins --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 --axes-grid --edges -e --armature --camera-index --interaction-style -k --interaction-trackball --invert-zoom --animation-autoplay --animation-index --animation-indices --animation-speed-factor --animation-time --font-file --font-scale --font-color --backdrop-opacity --command-script --normal-glyphs --point-sprites -o --point-sprites-type --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-background -u --blur-coc --light-intensity --scalar-coloring -s --coloring-array --coloring-component -y --coloring-by-cells -c --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 --translucency-support --ambient-occlusion -q --anti-aliasing -a --anti-aliasing-mode --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
