mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
New --post-process option. Includes some cleaning of the STDOUT messages
This commit is contained in:
parent
ae35df716f
commit
555c23069d
10 changed files with 63 additions and 28 deletions
|
@ -254,6 +254,16 @@ our $Options = {
|
|||
serialize => sub { join '\n', split /\R+/, $_[0] },
|
||||
deserialize => sub { join "\n", split /\\n/, $_[0] },
|
||||
},
|
||||
'post_process' => {
|
||||
label => 'Post-processing scripts',
|
||||
cli => 'post-process=s@',
|
||||
type => 's@',
|
||||
multiline => 1,
|
||||
width => 350,
|
||||
height => 60,
|
||||
serialize => sub { join '; ', @{$_[0]} },
|
||||
deserialize => sub { [ split /\s*;\s*/, $_[0] ] },
|
||||
},
|
||||
|
||||
# retraction options
|
||||
'retract_length' => {
|
||||
|
@ -352,6 +362,14 @@ sub serialize {
|
|||
: get($opt_key);
|
||||
}
|
||||
|
||||
sub deserialize {
|
||||
my $class = @_ == 3 ? shift : undef;
|
||||
my ($opt_key, $value) = @_;
|
||||
return $Options->{$opt_key}{deserialize}
|
||||
? set($opt_key, $Options->{$opt_key}{deserialize}->($value))
|
||||
: set($opt_key, $value);
|
||||
}
|
||||
|
||||
sub save {
|
||||
my $class = shift;
|
||||
my ($file) = @_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue