Skip to content

Commit

Permalink
mod_blend: Don't produce corrupted audiofile when blender version is …
Browse files Browse the repository at this point in the history
…checked
  • Loading branch information
morevnaproject committed Jan 20, 2014
1 parent 450e8e6 commit 3488fdc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/mod_blend
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ renderscript(){
else
AUDIO_FILENAME="`pwd`/$RENDERPATH"
fi
if [[ $1 == 0 ]]; then
AUDIO_FILENAME="${PROJECTROOT}/render/tmp/mod_blend_check.wav"
fi

cat > "$RENDERSCRIPT" << EOF
import sys
Expand Down Expand Up @@ -301,7 +304,7 @@ EOF
UPDATE=0 # This is critical!
RENDERSCRIPT="${PROJECTROOT}/render/tmp/mod_blend_check.py"
OUTPUT="${PROJECTROOT}/render/tmp/mod_blend_check.mpg"
renderscript
renderscript 0
RANGE="-a"
( blender -b "$TESTDATA_PATH/blender-ffmpeg-and-audio-hd.blend" -S Scene -P "$RENDERSCRIPT" -o "$OUTPUT" -x 1 -F $BLENDERFORMAT -t 0 $RANGE 2>&1 | grep -E '^Saved: ' ) || true
if [ ! -f "$OUTPUT" ]; then
Expand Down Expand Up @@ -365,7 +368,7 @@ rules(){
fi

RENDERSCRIPT="`echo "$RENDERPATH" | sed -e "s|\.$FORMAT$|.py|"`"
renderscript
renderscript 1

if [ ! -z $SINGLE ]; then
RANGE="-f $SINGLE"
Expand Down

0 comments on commit 3488fdc

Please sign in to comment.