From 9abcd5816c6af1ba4a4f2534044fc93c779020d9 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 25 Jan 2015 15:36:20 +0100 Subject: [PATCH] Little test for mixing objects and toolpaths --- lib/Slic3r/GUI/3DScene.pm | 2 +- lib/Slic3r/GUI/Plater/3DPreview.pm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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);