diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-09-10 14:19:53 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-09-10 14:19:53 +0300 |
commit | 333bc1523a18f6d4314a7c92e89d157b5c90276a (patch) | |
tree | c5df75a161eeb0f47530a846ef20331cd494e419 /lib | |
parent | d8936b1ad8e14372e911c7a7ebb7f1adc30ceae3 (diff) | |
parent | be508b003a5348aaf3c79a7eeb14b3b90f197b41 (diff) |
Merge branch 'master' of https://github.com/prusa3d/Slic3r into dev
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Slic3r/GUI/Plater.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 016c2e800..9b3457ef4 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -879,6 +879,15 @@ sub load_files { $model->convert_multipart_object(scalar(@$nozzle_dmrs)) if $dialog->ShowModal() == wxID_YES; } + # objects imported from 3mf require a call to center_around_origin to have gizmos working properly and this call + # need to be done after looks_like_multipart_object detection + if ($input_file =~ /.3[mM][fF]$/) + { + foreach my $model_object (@{$model->objects}) { + $model_object->center_around_origin; # also aligns object to Z = 0 + } + } + if ($one_by_one) { push @obj_idx, $self->load_model_objects(@{$model->objects}); } else { |