update animation script
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 240 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 80 KiB |
@ -19,13 +19,12 @@ if [ -n "$3" ]; then
|
|||||||
target_dir="$3"
|
target_dir="$3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Current directory: $(pwd)"
|
|
||||||
|
|
||||||
filename_without_extension="${name%.*}"
|
filename_without_extension="${name%.*}"
|
||||||
|
|
||||||
# needs tomorrow night openscad theme
|
# needs tomorrow night openscad theme
|
||||||
# convert -resize 20% -delay 6 -loop 0 -transparent "#1d1f21" -dispose previous frame000*.png "$filename_without_extension".gif
|
# convert -resize 20% -delay 6 -loop 0 -transparent "#1d1f21" -dispose previous frame000*.png "$filename_without_extension".gif
|
||||||
|
|
||||||
convert -resize 20% -delay 6 -loop 0 -dispose previous "$png_dir"/"$filename_without_extension"000*.png "$target_dir"/"$filename_without_extension".gif
|
convert -delay 6 -loop 0 -dispose previous "$png_dir"/"$filename_without_extension"000*.png "$target_dir"/"$filename_without_extension".gif
|
||||||
|
|
||||||
gifsicle -O3 --colors=64 --scale 0.5 -i "$target_dir"/"$filename_without_extension".gif -o "$target_dir"/"$filename_without_extension".gif
|
#gifsicle -O3 --colors=64 --scale 0.5 -i "$target_dir"/"$filename_without_extension".gif -o "$target_dir"/"$filename_without_extension".gif
|
||||||
|
gifsicle -O3 --colors=64 --no-warnings --scale 0.5 -i "$target_dir"/"$filename_without_extension".gif -o "$target_dir"/"$filename_without_extension".gif
|
||||||
@ -158,18 +158,15 @@ def build_single(build_dir, target_dir, filename, config, dz, nightly):
|
|||||||
run_openscad(openscad_args, nightly)
|
run_openscad(openscad_args, nightly)
|
||||||
|
|
||||||
def build_assembly_gifs(config, dz, nightly):
|
def build_assembly_gifs(config, dz, nightly):
|
||||||
print('Building assembly-gifs. Source Dir:', ASSEMBLY_GIF_DIR, ', Target:', ASSEMBLY_GIF_BUILD_DIR)
|
print('Building assembly-gifs. Source Dir:', ASSEMBLY_GIF_DIR, '| Target:', ASSEMBLY_GIF_BUILD_DIR)
|
||||||
|
|
||||||
for (fileName, numSteps) in ASSEMBLY_STEPS:
|
for (fileName, numSteps) in ASSEMBLY_STEPS:
|
||||||
print('Rendering', fileName)
|
print('Building GIF for', fileName)
|
||||||
openscad_args = construct_openscad_animation_args(
|
openscad_args = construct_openscad_animation_args(
|
||||||
ASSEMBLY_GIF_DIR, ASSEMBLY_GIF_TEMP_DIR, fileName, config, dz, numSteps
|
ASSEMBLY_GIF_DIR, ASSEMBLY_GIF_TEMP_DIR, fileName, config, dz, numSteps
|
||||||
)
|
)
|
||||||
run_openscad(openscad_args, nightly)
|
run_openscad(openscad_args, nightly)
|
||||||
|
|
||||||
print("Building GIF for", fileName)
|
|
||||||
build_gif_from_png(fileName)
|
build_gif_from_png(fileName)
|
||||||
print("Done")
|
|
||||||
|
|
||||||
def build_gif_from_png(fileName):
|
def build_gif_from_png(fileName):
|
||||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|||||||