Utilize Blender 2.8 to instantly open all kinds of 3D model files by double clicking them from Cinnamon / Nemo or similar. Bash, Python and some configuration for Linux Mint 19.3
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12345678910111213 |
- #!/bin/bash
- if [[ -f $1 ]]; then
- echo "$1 is a file"
- filename=$(basename -- "$1")
- extension="${filename##*.}"
- if [[ $extension == *"blend"* ]]; then
- exec ~/.local/share/blender/blender "$@"
- else
- exec ~/.local/share/blender/blender --python ~/.local/bin/blender_2.8_import_3dobjects.py -- "$1"
- fi
- else
- exec ~/.local/share/blender/blender "$@"
- fi
|