Commit e051f8c0 authored by Lucas Mello Schnorr's avatar Lucas Mello Schnorr

better management of filename

parent 6def7814
......@@ -141,21 +141,22 @@ elif [ "$DEFAULT_ANIMATION" = "false" ]; then
# Phase 2: blender animate #
##############################
pushd ${BLENDER_SCRIPT_DIR}
# Remove symbolic link, if it does exists
rm -f ${FILE_WITH_DATA}
# Add a symbolic link to the data
ln -s ${ALIROOT_SCRIPT_DIR}/${FILE_WITH_DATA} ${BLENDER_SCRIPT_DIR}
LOCAL_FILE_WITH_DATA=${EVENT_UNIQUE_ID}.dat
cp ${ALIROOT_SCRIPT_DIR}/$FILE_WITH_DATA \
${BLENDER_SCRIPT_DIR}/${LOCAL_FILE_WITH_DATA}
for type in "BarrelCamera" "OverviewCamera" "ForwardCamera"; do
echo "Processing ${EVENT_UNIQUE_ID} with $type Camera in blender"
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera=${type} -datafile="${FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.01 -fps=5 -resolution=50 -stamp_note="${EVENT_UNIQUE_ID}"
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera=${type} -datafile="${LOCAL_FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.01 -fps=5 -resolution=50 -stamp_note="${EVENT_UNIQUE_ID}"
# Move generated file to final location
mv /tmp/blender/* ${BLENDER_OUTPUT}
echo "${type} for event ${EVENT_ID} done."
done
# Move processed file to final location
mv $FILE_WITH_DATA ${BLENDER_OUTPUT}
mv $LOCAL_FILE_WITH_DATA ${BLENDER_OUTPUT}
popd
echo "EVENT ${EVENT_ID} DONE."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment