19 lines
1.3 KiB
Bash
19 lines
1.3 KiB
Bash
#!/bin/bash
|
|
# usage: go.sh <ids csv> [times csv] [size] [viewH]
|
|
S="C:/Users/sw/AppData/Local/Temp/tks_vfx_capture"
|
|
IDS="$1"; TIMES="${2:-0.07,0.2,0.4,0.7,1.1,1.6,2.3}"; SIZE="${3:-480}"; VIEW="${4:-9}"
|
|
cd E:/Nerdnavis/ThreeKingdomsSlingshot
|
|
st=$(unity command --project-path . editor status 2>&1 | grep -o '"playMode":"[a-z]*"')
|
|
if [ "$st" != '"playMode":"playing"' ]; then
|
|
unity command --project-path . editor.playmode start >/dev/null 2>&1
|
|
for i in $(seq 1 40); do st=$(unity command --project-path . editor status 2>&1 | grep -o '"playMode":"[a-z]*"'); [ "$st" == '"playMode":"playing"' ] && break; done
|
|
fi
|
|
for id in ${IDS//,/ }; do rm -f "$S/shots/out/${id}_"*.png; done
|
|
rm -f "$S/shots/out/done.txt"
|
|
printf '%s\n%s\n%s\n%s\n%s\n' "$S/shots/out" "$IDS" "$TIMES" "$SIZE" "$VIEW" > "$S/shots/args.txt"
|
|
unity command --project-path . --timeout 120 script eval --file "E:/Nerdnavis/ThreeKingdomsSlingshot/Tools/vfx_capture/run.cs" 2>&1 | tail -1 | cut -c1-300
|
|
for i in $(seq 1 200); do [ -f "$S/shots/out/done.txt" ] && break; unity command --project-path . editor status >/dev/null 2>&1; done
|
|
cat "$S/shots/out/done.txt" 2>/dev/null
|
|
python -I -X utf8 "E:/Nerdnavis/ThreeKingdomsSlingshot/Tools/vfx_capture/tile.py" "$S/shots/out" "$IDS" ${5:-320}
|
|
unity command --project-path . console get --level error --tail 5 2>&1 | tail -1 | cut -c1-700
|