#!/bin/bash

# Template for combining multiple case animations together.  Note that this
# template is built for 3 cases or directories.  If you have more or fewer,
# you will need to adjust some portions below.

# Fill in directory variables, d1=, d2=, d3=, etc.:

d1=""
d2=""
d3=""

dList="$d1 $d2 $d3"

# Fill in list of attribute files (without the .attr extension):
aList=""

# You should only need to modify the portion below if you have a different
# number of directories (this template is built for 3 directories).
for a in $aList; do
  for d in $dList; do
    cd $d
    BATCHMOVIE.sh $a
    cd ../
  done

  MULTIFRAME.tcl h -sub ${a} -name ${a} -max \
                 ${d1}/${a} \
                 ${d2}/${a} \
                 ${d3}/${a}

  jpg2mpg ${a}/${a}*jpg -o combined_${a}.mpg
done
