mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Integration with Octoprint. #1826
This commit is contained in:
parent
eba19aaba4
commit
efe7d5f857
6 changed files with 104 additions and 10 deletions
|
@ -923,6 +923,7 @@ sub build {
|
|||
$self->init_config_options(qw(
|
||||
bed_shape z_offset
|
||||
gcode_flavor use_relative_e_distances
|
||||
octoprint_host octoprint_apikey
|
||||
use_firmware_retraction pressure_advance vibration_limit
|
||||
start_gcode end_gcode layer_gcode toolchange_gcode
|
||||
nozzle_diameter extruder_offset
|
||||
|
@ -996,6 +997,11 @@ sub build {
|
|||
}
|
||||
});
|
||||
}
|
||||
{
|
||||
my $optgroup = $page->new_optgroup('Octoprint upload');
|
||||
$optgroup->append_single_option_line('octoprint_host');
|
||||
$optgroup->append_single_option_line('octoprint_apikey');
|
||||
}
|
||||
{
|
||||
my $optgroup = $page->new_optgroup('Advanced');
|
||||
$optgroup->append_single_option_line('use_firmware_retraction');
|
||||
|
@ -1129,6 +1135,8 @@ sub _update {
|
|||
|
||||
my $config = $self->{config};
|
||||
|
||||
$self->get_field('octoprint_apikey')->toggle($config->get('octoprint_host'));
|
||||
|
||||
my $have_multiple_extruders = $self->{extruders_count} > 1;
|
||||
$self->get_field('toolchange_gcode')->toggle($have_multiple_extruders);
|
||||
|
||||
|
@ -1319,8 +1327,8 @@ sub config {
|
|||
}
|
||||
|
||||
# apply preset values on top of defaults
|
||||
my $config = Slic3r::Config->new_from_defaults(@$keys);
|
||||
my $external_config = Slic3r::Config->load($self->file);
|
||||
my $config = Slic3r::Config->new;
|
||||
$config->set($_, $external_config->get($_))
|
||||
for grep $external_config->has($_), @$keys;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue