#!/bin/sh

if [ $# -lt 1 ]
	then
	echo "BVH USAGE ERROR: \a"
	echo "Usage: $0 direntry"
	echo "Example: $0 /Volumes/TwoWorldsCD/meshes/"
	echo "Comments: Create BVH file for dynamic meshes"
	exit 1
fi

echo "Creating BVH files from POD in directory $1 ..."

cp AnimConverter "$1AnimConverter"

cd "$1"
for i in *.pod
do
	echo "Creating bvh for file $i"
	./AnimConverter --input=$i --output=$i --validate=1
done

rm "$1AnimConverter"

echo "Finished. Quiting ..."