Skip to content

Commit dd7acb5

Browse files
committed
Improved the built script and updated the JPG, PNG and PDF to the last version
1 parent 9b923c2 commit dd7acb5

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

build.sh

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1-
#!/bin/bsh
1+
#!/bin/bash
2+
3+
# Build script for the uHbench
4+
# ============================
5+
#
6+
# This script is a helper tool to get the rendered files built in one go.
7+
# There is a pretty good chance this will not work on your system, but you can try ;)
8+
#
9+
# First, have all the right tools installed:
10+
# - BLender with Freestyle and Freestyle-SVG-exporter activated in your user.prefs
11+
# - Inkscape
12+
# - ImageMagick
13+
# - XMLStarlet
14+
#
15+
# Then run it with: sh build.sh
16+
# And watch the console for errors.
17+
# Complaints, suggestions or bitcoins, send them to julien [at] xuv.be
218

3-
# SETTINGS
419

5-
# This coresponds to the names used for the scenes in the .blend file. Oviously, odn't use space in your names.
20+
# SETTINGS
21+
# --------
22+
FILENAME=uhbench
23+
# This corresponds to the names used for the scenes in the .blend file. Oviously, don't use space in your names.
624
STEPS=(step0 step1 step2 step3 step4 step5 step6 step7 step8)
725
BUILD_DIR=build
826

27+
28+
# BLENDER rendering
29+
# -----------------
930
for s in ${STEPS[@]}
1031
do
1132
# Launch Blender render for selected scene
12-
blender -b uhbench.blend -S ${s} --render-output //${BUILD_DIR}/${s}_ -f 1
33+
blender -b ${FILENAME}.blend -S ${s} --render-output //${BUILD_DIR}/${s}_ -f 1
1334

1435
# Remove extra "fills" in the SVG
1536
# This line should be removed once Freestyle-SVG-exporter handles toggling "Contour Fills" per lineset
@@ -20,8 +41,19 @@ done
2041
echo "Cleaning up..."
2142
rm ${BUILD_DIR}/*.png
2243

44+
# IMAGE rendering
45+
# ---------------
46+
2347
# Generate a gif ;)
2448
echo "Creating animated GIF..."
25-
convert -delay 100 -loop 0 ${BUILD_DIR}/step*.svg uHbench-loop.gif
49+
convert -delay 100 -loop 0 ${BUILD_DIR}/step*.svg ${FILENAME}.gif
50+
51+
# Rendering the png, jpg and pdf
52+
echo "Rendering to PNG"
53+
inkscape -f ${FILENAME}.svg -e ${FILENAME}.png
54+
echo "Rendering to JPG"
55+
inkscape -f ${FILENAME}.svg --export-dpi 300 -e ${FILENAME}.jpg
56+
echo "Rendering to PDF"
57+
inkscape -f ${FILENAME}.svg --export-text-to-path -A ${FILENAME}.pdf
2658

27-
echo "Done"
59+
echo "Done."

uhbench.jpg

2.02 MB
Loading

uhbench.pdf

-76 Bytes
Binary file not shown.

uhbench.png

-873 KB
Loading

0 commit comments

Comments
 (0)