Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALICE-open-data
ALICE Blender animation
Commits
0d68127e
Commit
0d68127e
authored
Dec 16, 2019
by
Lucas Mello Schnorr
Browse files
correctly dealing with output dir
parent
343c2faa
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflow_sketch.sh
View file @
0d68127e
...
@@ -63,6 +63,8 @@ if [ "$DOWNLOAD" = "true" ]; then
...
@@ -63,6 +63,8 @@ if [ "$DOWNLOAD" = "true" ]; then
wget
$URL
wget
$URL
fi
fi
SCRIPT_CURRENT_DIR
=
$(
pwd
)
######################################
######################################
# Established Unique ID based on URL #
# Established Unique ID based on URL #
######################################
######################################
...
@@ -119,8 +121,7 @@ elif [ "$DEFAULT_ANIMATION" = "false" ]; then
...
@@ -119,8 +121,7 @@ elif [ "$DEFAULT_ANIMATION" = "false" ]; then
#################################################
#################################################
# Create directory where animations will be saved
# Create directory where animations will be saved
BLENDER_OUTPUT
=
$UNIQUEID
BLENDER_OUTPUT
=
$(
pwd
)
/
$UNIQUEID
rm
-rf
${
BLENDER_OUTPUT
}
mkdir
--verbose
-p
${
BLENDER_OUTPUT
}
mkdir
--verbose
-p
${
BLENDER_OUTPUT
}
# Get all extracted files
# Get all extracted files
...
@@ -150,15 +151,20 @@ elif [ "$DEFAULT_ANIMATION" = "false" ]; then
...
@@ -150,15 +151,20 @@ elif [ "$DEFAULT_ANIMATION" = "false" ]; then
for
type
in
"BarrelCamera"
"OverviewCamera"
"ForwardCamera"
;
do
for
type
in
"BarrelCamera"
"OverviewCamera"
"ForwardCamera"
;
do
echo
"Processing
${
EVENT_UNIQUE_ID
}
with
$type
Camera in blender"
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
=
"
${
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."
echo
"
${
type
}
for event
${
EVENT_ID
}
done."
done
done
# Move processed file to final location
mv
$FILE_WITH_DATA
${
BLENDER_OUTPUT
}
popd
popd
echo
"EVENT
${
EVENT_ID
}
DONE."
echo
"EVENT
${
EVENT_ID
}
DONE."
done
done
popd
popd
# Move animation directory to local folder
# Move to where this script is executed
mv
--verbose
/tmp/blender
${
BLENDER_OUTPUT
}
mv
${
BLENDER_OUTPUT
}
${
SCRIPT_CURRENT_DIR
}
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment