setup_test_env.bash 738 B

12345678910111213141516171819202122232425262728293031
  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. fi
  6. export JSON=`python -c "import tempfile;print(tempfile.mktemp(prefix='$TAG.', suffix='.json'))"`
  7. export BLENDER_USER_SCRIPTS=$(cd "$DIR/../../"; pwd)
  8. # set the root for blend files
  9. export BLEND=$(cd "$DIR/../blend"; pwd)
  10. # set the python script to exec in batch
  11. export PYSCRIPT="$DIR/exporter.py"
  12. function makereview() {
  13. if [ ! -f "$JSON" ]; then
  14. echo "no json, export error suspected"
  15. exit 1
  16. fi
  17. python3 "$DIR/review.py" $JSON $@
  18. }
  19. function tagname() {
  20. tag=`basename $0`
  21. tag=${tag#test_}
  22. tag=${tag%%.*}
  23. echo $tag
  24. }