model_viewer: accept more than one extra model on the command line
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 25 Jun 2016 18:38:32 +0000 (14:38 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sun, 26 Jun 2016 12:03:54 +0000 (08:03 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/model_viewer/src/model_viewer.nit

index ab2e4b3..0680059 100644 (file)
@@ -55,12 +55,11 @@ redef class App
                var logo = new Texture("splash.png")
                show_splash_screen logo
 
-               if args.length > 0 then
-                       # Load a model passed as the first command line argument
-                       var model_path = args.first
                        if model_path.has_prefix("assets/") then model_path = model_path.substring_from(7)
+               # Load all models passed as command line argument
+               for arg in args.to_a.reversed do
 
-                       var model = new Model(model_path)
+                       var model = new Model(arg)
                        models.unshift model
                end