Support skeining multiple files from the command line. Update the status output to include input and export filenames.

This commit is contained in:
Owen Stenseth 2012-02-21 09:26:54 -07:00
parent aa7a5d6069
commit c539a8d9e0
2 changed files with 14 additions and 16 deletions

View file

@ -71,21 +71,18 @@ if (!@ARGV && !$opt{save} && eval "require Slic3r::GUI; 1") {
exit;
}
if ($ARGV[0]) {
# skein
my $input_file = $ARGV[0];
my $skein = Slic3r::Skein->new(
input_file => $input_file,
output_file => $opt{output},
status_cb => sub {
my ($percent, $message) = @_;
printf "=> $message\n";
},
);
$skein->go;
if (@ARGV) {
foreach my $input_file ( @ARGV ) {
my $skein = Slic3r::Skein->new(
input_file => $input_file,
output_file => $opt{output},
status_cb => sub {
my ($percent, $message) = @_;
printf "=> $message\n";
},
);
$skein->go;
}
} else {
usage(1) unless $opt{save};
}