From c21d94be4402fc875e8b76ce04773b0dc9ab88a6 Mon Sep 17 00:00:00 2001 From: MoBit Date: Fri, 3 Dec 2021 05:07:19 +0100 Subject: [PATCH] Fix bundles order in animation --- src/animation.jl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/animation.jl b/src/animation.jl index 7150ade..1657591 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -130,7 +130,16 @@ function animate_after_loading(dir, animation_path, sim_consts, framerate, debug particle_radius = sim_consts.particle_diameter / 2 interaction_r = sim_consts.interaction_r - bundle_paths = readdir("$dir/bundles"; join=true) + bundle_paths = readdir("$dir/bundles"; join=true, sort=false) + + sort_perm = sortperm([ + parse(Int64, s[(findfirst("bundle_", s).stop + 1):(end - length(".jld2"))]) for + s in bundle_paths + ]) + + bundle_paths = bundle_paths[sort_perm] + sort_perm = nothing + skin_r = 0.0 @showprogress 1 for (n_bundle, bundle_path) in enumerate(bundle_paths)