New --close-after-slicing option to allow for easy integration with Pronterface
This commit is contained in:
parent
a10d13120c
commit
ba1b59f54c
@ -115,13 +115,18 @@ sub do_slice {
|
|||||||
$process_dialog->Pulse;
|
$process_dialog->Pulse;
|
||||||
my $skein = Slic3r::Skein->new(
|
my $skein = Slic3r::Skein->new(
|
||||||
input_file => $input_file,
|
input_file => $input_file,
|
||||||
|
output_file => $main::opt{output},
|
||||||
);
|
);
|
||||||
$skein->go;
|
$skein->go;
|
||||||
$process_dialog->Destroy;
|
$process_dialog->Destroy;
|
||||||
undef $process_dialog;
|
undef $process_dialog;
|
||||||
|
|
||||||
|
if (!$main::opt{close_after_slicing}) {
|
||||||
Wx::MessageDialog->new($self, "$input_file_basename was successfully sliced.", 'Done!',
|
Wx::MessageDialog->new($self, "$input_file_basename was successfully sliced.", 'Done!',
|
||||||
wxOK | wxICON_INFORMATION)->ShowModal;
|
wxOK | wxICON_INFORMATION)->ShowModal;
|
||||||
|
} else {
|
||||||
|
$self->GetParent->Destroy(); # quit
|
||||||
|
}
|
||||||
};
|
};
|
||||||
$self->catch_error(sub { $process_dialog->Destroy if $process_dialog });
|
$self->catch_error(sub { $process_dialog->Destroy if $process_dialog });
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,13 @@ use Getopt::Long;
|
|||||||
use Slic3r;
|
use Slic3r;
|
||||||
use XXX;
|
use XXX;
|
||||||
|
|
||||||
my %opt;
|
our %opt;
|
||||||
GetOptions(
|
GetOptions(
|
||||||
'help' => sub { usage() },
|
'help' => sub { usage() },
|
||||||
|
|
||||||
'debug' => \$Slic3r::debug,
|
'debug' => \$Slic3r::debug,
|
||||||
'o|output' => \$opt{output},
|
'o|output=s' => \$opt{output},
|
||||||
|
'close-after-slicing' => \$opt{close_after_slicing},
|
||||||
|
|
||||||
'save=s' => \$opt{save},
|
'save=s' => \$opt{save},
|
||||||
'load=s' => \$opt{load},
|
'load=s' => \$opt{load},
|
||||||
|
Loading…
Reference in New Issue
Block a user