setup_test_env.bash 650 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # you must have blender setup to run from the command line
  3. if [[ `which blender` == "" ]]; then
  4. echo "No 'blender' executable found on the command line"
  5. exit 1
  6. fi
  7. export JSON=`python -c "import tempfile;print(tempfile.mktemp(prefix='$TAG.', suffix='.json'))"`
  8. export BLENDER_USER_SCRIPTS=$(cd "$DIR/../../"; pwd)
  9. # set the root for blend files
  10. export BLEND=$(cd "$DIR/../blend"; pwd)
  11. # set the python script to exec in batch
  12. export PYSCRIPT="$DIR/exporter.py"
  13. function makereview() {
  14. python3 "$DIR/review.py" $JSON $@
  15. }
  16. function tagname() {
  17. tag=`basename $0`
  18. tag=${tag#test_}
  19. tag=${tag%%.*}
  20. echo $tag
  21. }