Add: shell scripts for rendering test frame and animation

main
rkcf 2023-07-07 17:20:18 -05:00
parent e345ab8da3
commit 2ff7738dab
2 changed files with 42 additions and 0 deletions

21
scripts/render-animation.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Renders a blender animation
if [ $# -ne 1 ]; then
echo "You must supply a blend file"
exit 1
fi
if [ ! -e $1 ]; then
echo "$1 is not a valid file"
exit 1
fi
BLENDFILE=$(basename -s .blend $1)
cd "$(dirname $1)"
time blender -b ${BLENDFILE}.blend -o //renders/$BLENDFILE -a -t 0 -- --cycles-device CUDA+CPU | grep Finished
exit 0
# vim:set ts=2 sw=2 et:

21
scripts/test-render.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Renders the first frame of a blender file
if [ $# -ne 1 ]; then
echo "You must supply a blend file"
exit 1
fi
if [ ! -e $1 ]; then
echo "$1 is not a valid file"
exit 1
fi
BLENDFILE=$(basename -s .blend $1)
cd "$(dirname $1)"
time blender -b ${BLENDFILE}.blend -o //renders/stills/$BLENDFILE -t 0 -F PNG -f 1 -- --cycles-device CUDA+CPU | grep Finished
exit 0
# vim:set ts=2 sw=2 et: