Skip to content

Instantly share code, notes, and snippets.

@beothorn
Created January 17, 2018 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beothorn/c50638e384732586d4ae6cc488f9430d to your computer and use it in GitHub Desktop.
Save beothorn/c50638e384732586d4ae6cc488f9430d to your computer and use it in GitHub Desktop.
Render a .blend file in all sizes needed for android
if [ -z "$1" ]
then
echo ".blend logo file as argument"
fi
blender -b $1 -S XXXHDPI -o //mipmap-xxxhdpi/ -a -S XXHDPI -o //mipmap-xxhdpi/ -a -S XHDPI -o //mipmap-xhdpi/ -a -S HDPI -o //mipmap-hdpi/ -a -S MDPI -o //mipmap-mdpi/ -a
mv ./mipmap-xxxhdpi/0001.png ./mipmap-xxxhdpi/ic_launcher.png
cp ./mipmap-xxxhdpi/ic_launcher.png ./mipmap-xxxhdpi/ic_launcher_round.png
mv ./mipmap-xxhdpi/0001.png ./mipmap-xxhdpi/ic_launcher.png
cp ./mipmap-xxhdpi/ic_launcher.png ./mipmap-xxhdpi/ic_launcher_round.png
mv ./mipmap-xhdpi/0001.png ./mipmap-xhdpi/ic_launcher.png
cp ./mipmap-xhdpi/ic_launcher.png ./mipmap-xhdpi/ic_launcher_round.png
mv ./mipmap-hdpi/0001.png ./mipmap-hdpi/ic_launcher.png
cp ./mipmap-hdpi/ic_launcher.png ./mipmap-hdpi/ic_launcher_round.png
mv ./mipmap-mdpi/0001.png ./mipmap-mdpi/ic_launcher.png
cp ./mipmap-mdpi/ic_launcher.png ./mipmap-mdpi/ic_launcher_round.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment