Objects colored by extruder color

This commit is contained in:
Enrico Turri 2018-04-05 12:52:29 +02:00
parent 1e185dacc4
commit 76beaa6421
9 changed files with 118 additions and 2 deletions

View file

@ -1677,6 +1677,11 @@ sub draw_warning {
}
}
sub update_volumes_colors_by_extruder {
my ($self, $config) = @_;
$self->volumes->update_colors_by_extruder($config);
}
sub opengl_info
{
my ($self, %params) = @_;

View file

@ -216,6 +216,8 @@ sub reload_scene {
}
}
$self->update_volumes_colors_by_extruder($self->{config});
# checks for geometry outside the print volume to render it accordingly
if (scalar @{$self->volumes} > 0)
{

View file

@ -247,6 +247,7 @@ sub _update {
$self->{cut_options}{z},
[@expolygons],
);
$self->{canvas}->update_volumes_colors_by_extruder($self->GetParent->{config});
$self->{canvas}->Render;
}
}

View file

@ -162,6 +162,7 @@ sub new {
$canvas->load_object($self->{model_object}, undef, undef, [0]);
$canvas->set_auto_bed_shape;
$canvas->SetSize([500,700]);
$canvas->update_volumes_colors_by_extruder($self->GetParent->GetParent->GetParent->{config});
$canvas->zoom_to_volumes;
}