#!/bin/bash # # Create character spritesheet and join all the rendered images # Requires blender and imagemagick # set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) if [ "$#" -ne 1 ]; then echo "Usage: make_spritesheet.sh body" exit 1 fi if [[ "$OSTYPE" == "linux-gnu" ]]; then BLENDER=blender elif [[ "$OSTYPE" == "msys" ]]; then BLENDER="/c/Program Files/Blender Foundation/Blender 4.4/blender.exe" else # macOS BLENDER=/Applications/blender.app/Contents/MacOS/blender fi if [[ "$OSTYPE" == "msys" ]]; then BLENDER_OUT="C:/out" else BLENDER_OUT="out" fi INFILE=$1/src.blend # Render separate body parts (in collections) parts=(legs upper) # Render separate actions actions_legs=(idle run) actions_upper=(idle run idle_handgun run_handgun idle_dualgun run_dualgun idle_rifle run_rifle idle_riflefire run_riflefire) idle_frames=1 run_frames=80 len_i=${#parts[*]} for (( i=0; i