diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 97f8b3e63..2974179ca 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -835,7 +835,7 @@ sub draw_volumes { my @sorted_z = (); my ($min_z, $max_z); - if ($volume->range) { + if ($volume->range && $volume->offsets) { @sorted_z = sort { $a <=> $b } keys %{$volume->offsets}; ($min_z, $max_z) = @{$volume->range}; diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index e34650538..be9b5f572 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -118,6 +118,9 @@ sub load_print { if ($self->IsShown) { foreach my $object (@{$self->print->objects}) { $self->canvas->load_print_object_toolpaths($object); + + #my @volume_ids = $self->canvas->load_object($object->model_object); + #$self->canvas->volumes->[$_]->color->[3] = 0.2 for @volume_ids; } $self->canvas->zoom_to_volumes; $self->_loaded(1);