setup_test_env.bash 758 B

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