Introduction
Introduction Statistics Contact Development Disclaimer Help
tsave images and animations to current folder, return after cd - Granular.jl - …
git clone git://src.adamsgaard.dk/Granular.jl
Log
Files
Refs
README
LICENSE
---
commit 4414c74407f94e6487b083ac4a28405e7ddc6058
parent c6ba5de8b5601deef12ce01767d8be3252e21ec6
Author: Anders Damsgaard <[email protected]>
Date: Wed, 1 Nov 2017 10:32:14 -0400
save images and animations to current folder, return after cd
Diffstat:
M src/io.jl | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/io.jl b/src/io.jl
t@@ -681,6 +681,7 @@ function writeParaviewPythonScript(simulation::Simulation;
ice_floes_color_scheme::String="X Ray",
verbose::Bool=true)
if filename == ""
+ folder = string(folder, "/", simulation.id)
mkpath(folder)
filename = string(folder, "/", simulation.id, ".py")
end
t@@ -885,7 +886,7 @@ renderView1.InteractionMode = '2D'
""")
if save_animation
write(f, """
-SaveAnimation('$(folder)/$(simulation.id).avi', renderView1,
+SaveAnimation('./$(simulation.id).avi', renderView1,
ImageResolution=[$(width), $(height)],
FrameRate=$(framerate),
FrameWindow=[0, $(simulation.file_number)])
t@@ -894,7 +895,7 @@ FrameWindow=[0, $(simulation.file_number)])
if save_images
write(f, """
-SaveAnimation('$(folder)/$(simulation.id).png', renderView1,
+SaveAnimation('./$(simulation.id).png', renderView1,
ImageResolution=[$(width), $(height)],
FrameRate=$(framerate),
FrameWindow=[0, $(simulation.file_number)])
t@@ -942,6 +943,7 @@ function render(simulation::Simulation; pvpython::String="…
end
end
end
+ cd("..")
catch return_signal
if isa(return_signal, Base.UVError)
error("`pvpython` was not found.")
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.