From 61db9530d9d1b88bc821531a3dd9e031047194cd Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 22 Mar 2014 18:02:58 +0100 Subject: [PATCH] Fix AMF settings not being correctly propagated to plater and parts panel --- lib/Slic3r/Model.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Model.pm b/lib/Slic3r/Model.pm index 252aac6d2..c074d7908 100644 --- a/lib/Slic3r/Model.pm +++ b/lib/Slic3r/Model.pm @@ -326,13 +326,14 @@ sub add_volume { ); if (defined $volume->material_id) { - # merge material attributes (should we rename materials in case of duplicates?) + # merge material attributes and config (should we rename materials in case of duplicates?) if (my $material = $volume->object->model->materials->{$volume->material_id}) { my %attributes = %{ $material->attributes }; if (exists $self->model->materials->{$volume->material_id}) { - %attributes = (%attributes, %{ $self->model->materials->{$volume->material_id}->attributes }); + %attributes = (%attributes, %{ $self->model->materials->{$volume->material_id}->attributes }) } - $self->model->set_material($volume->material_id, {%attributes}); + my $new_material = $self->model->set_material($volume->material_id, {%attributes}); + $new_material->config->apply($material->config); } } } else {