Validation for --duplicate-grid and --bed-size
This commit is contained in:
parent
0b29ad123e
commit
134595fc99
@ -626,6 +626,20 @@ sub validate {
|
||||
die "Invalid value for --scale\n"
|
||||
if $Slic3r::scale <= 0;
|
||||
|
||||
# --bed-size
|
||||
die "Invalid value for --bed-size\n"
|
||||
if !ref $Slic3r::bed_size
|
||||
&& (!$Slic3r::bed_size || $Slic3r::bed_size !~ /^\d+,\d+$/);
|
||||
$Slic3r::bed_size = [ split /,/, $Slic3r::bed_size ]
|
||||
if !ref $Slic3r::bed_size;
|
||||
|
||||
# --duplicate-grid
|
||||
die "Invalid value for --duplicate-grid\n"
|
||||
if !ref $Slic3r::duplicate_grid
|
||||
&& (!$Slic3r::duplicate_grid || $Slic3r::duplicate_grid !~ /^\d+,\d+$/);
|
||||
$Slic3r::duplicate_grid = [ split /,/, $Slic3r::duplicate_grid ]
|
||||
if !ref $Slic3r::duplicate_grid;
|
||||
|
||||
# --duplicate
|
||||
die "Invalid value for --duplicate or --duplicate-grid\n"
|
||||
if !$Slic3r::duplicate || $Slic3r::duplicate < 1 || !$Slic3r::duplicate_grid
|
||||
|
Loading…
Reference in New Issue
Block a user