mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 01:25:59 +08:00
Set number of threads from GUI and save it in config files. #154
This commit is contained in:
parent
b93a46969d
commit
8fe5d11624
@ -21,6 +21,11 @@ our $Options = {
|
|||||||
serialize => sub { join '\n', split /\R/, $_[0] },
|
serialize => sub { join '\n', split /\R/, $_[0] },
|
||||||
deserialize => sub { join "\n", split /\\n/, $_[0] },
|
deserialize => sub { join "\n", split /\\n/, $_[0] },
|
||||||
},
|
},
|
||||||
|
'threads' => {
|
||||||
|
label => 'Threads (more speed, more memory usage)',
|
||||||
|
cli => 'threads|j=i',
|
||||||
|
type => 'i',
|
||||||
|
},
|
||||||
|
|
||||||
# output options
|
# output options
|
||||||
'output_filename_format' => {
|
'output_filename_format' => {
|
||||||
|
@ -71,6 +71,10 @@ sub new {
|
|||||||
title => 'Output',
|
title => 'Output',
|
||||||
options => [qw(output_filename_format duplicate_distance)],
|
options => [qw(output_filename_format duplicate_distance)],
|
||||||
},
|
},
|
||||||
|
other => {
|
||||||
|
title => 'Other',
|
||||||
|
options => [$Slic3r::have_threads ? qw(threads) : ()],
|
||||||
|
},
|
||||||
notes => {
|
notes => {
|
||||||
title => 'Notes',
|
title => 'Notes',
|
||||||
options => [qw(notes)],
|
options => [qw(notes)],
|
||||||
@ -95,6 +99,7 @@ sub new {
|
|||||||
foreach my $col (@cols) {
|
foreach my $col (@cols) {
|
||||||
my $vertical_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
my $vertical_sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||||
for my $optgroup (@$col) {
|
for my $optgroup (@$col) {
|
||||||
|
next unless @{ $panels{$optgroup}{options} };
|
||||||
my $optpanel = Slic3r::GUI::OptionsGroup->new($tab, %{$panels{$optgroup}});
|
my $optpanel = Slic3r::GUI::OptionsGroup->new($tab, %{$panels{$optgroup}});
|
||||||
$vertical_sizer->Add($optpanel, 0, wxEXPAND | wxALL, 10);
|
$vertical_sizer->Add($optpanel, 0, wxEXPAND | wxALL, 10);
|
||||||
}
|
}
|
||||||
@ -110,7 +115,7 @@ sub new {
|
|||||||
$make_tab->([qw(cooling)]),
|
$make_tab->([qw(cooling)]),
|
||||||
$make_tab->([qw(printer filament)], [qw(print_speed speed)]),
|
$make_tab->([qw(printer filament)], [qw(print_speed speed)]),
|
||||||
$make_tab->([qw(gcode)]),
|
$make_tab->([qw(gcode)]),
|
||||||
$make_tab->([qw(extrusion)], [qw(output)]),
|
$make_tab->([qw(extrusion other)], [qw(output)]),
|
||||||
);
|
);
|
||||||
|
|
||||||
$tabpanel->AddPage(Slic3r::GUI::Plater->new($tabpanel), "Plater");
|
$tabpanel->AddPage(Slic3r::GUI::Plater->new($tabpanel), "Plater");
|
||||||
|
@ -25,7 +25,6 @@ my %cli_options = ();
|
|||||||
'save=s' => \$opt{save},
|
'save=s' => \$opt{save},
|
||||||
'load=s@' => \$opt{load},
|
'load=s@' => \$opt{load},
|
||||||
'ignore-nonexistent-config' => \$opt{ignore_nonexistent_config},
|
'ignore-nonexistent-config' => \$opt{ignore_nonexistent_config},
|
||||||
'threads|j=i' => \$Slic3r::threads,
|
|
||||||
'export-svg' => \$opt{export_svg},
|
'export-svg' => \$opt{export_svg},
|
||||||
'merge|m' => \$opt{merge},
|
'merge|m' => \$opt{merge},
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user