So today only less than an hour ago we have done the impossible - well maybe not impossible but something that was not thought practical. With the work that I and the Animux developers have done we now have the ability to use the renderfarm in our future final frame output.
The problem was STARTRENDER.SH was causing errors with DrQueue, either with lost file path characters resulting in a "…not a valid integer" error, or a permission denied error (which is correctable). Over 2 weeks of headaches, today we have gotten the break we needed.
From what I have read, production studios usually have a whole set of custom tools or code that help glue the pipeline. While on OUR end the process is pretty much functional, however for the renderfarm it was not. So after realizing that all that was needed was a simple processing script to add a single line of code to the STARTRENDER.SH script so that DrQueue could submit jobs error free, the talented Rexy (the lead programmer of Animux) built THIS shell script that processes the script and adds that single line of code. Work needs to be done to it over time but at this moment it does in fact work, works well and as far as I know Animux is the ONLY Blender-Mosaic-DrQueue renderfarm in the entire world.
If one wants to look over the script here it is :
#!/bin/bash
declare -r defaultFile="STARTRENDER.SH"
die() {
echo "$*" >&2
exit 1
}
printHelp() {
echo "Here we shall write a help screen... some day :)"
}
processFile() {
if [ ! -f "$1" ]; then die "No such file: $1"; fi
echo "cd \$(dirname \"\$0\")" > "$1.tmp-$$" || die "Can't write into temporary file: $1.tmp-$$"
cat "$1" >> "$1.tmp-$$" && mv "$1.tmp-$$" "$1" || die "Can't edit file: $1"
chmod a+rwx "$1" || die "Can't make file executable: $1"
}
processDir() {
if [ ! -d "$1" ]; then die "No such directory: $1"; fi
find "$1" -type d -exec chmod 777 '{}' ';' \
&& find "$1" -type f -exec chmod 666 '{}' ';' \
|| die "Failed to process directory: $1"
processFile $(find "$1" -type f -name "$defaultFile")
}
if [ $# -lt 1 ]; then die "Too few options!"; fi
cl=$(getopt -n $(basename "$0") -o hd:f: --long help,dir:,file: -- "$@")
if [ $? != 0 ]; then exit 1; fi
eval set -- "$cl"
while true; do
case "$1" in
-h|--help) printHelp ; break ;;
-d|--dir) processDir $2 ; shift 2 ;;
-f|--file)
if [ "$2" = "" ] ; then
processFile "$defaultFile"
else
processFile "$2"
fi
shift 2
;;
--) shift ; break ;;
*) echo "Internal error!" ; exit 1 ;;
esac
done
To execute type in this on command line while in exported directory
postmosaic -d .