Save the vector used for aligning object volumes to origin and apply it to additional parts added from the object part panel in order to make them coincide

This commit is contained in:
Alessandro Ranellucci 2014-04-02 20:23:26 +02:00
parent 017158c877
commit 45559f87f3
3 changed files with 7 additions and 2 deletions

View file

@ -207,6 +207,9 @@ sub on_btn_load {
$new_volume->material_id($material_name);
}
# apply the same translation we applied to the object
$new_volume->mesh->translate(@{$self->{model_object}->origin_translation}, 0);
# set a default extruder value, since user can't add it manually
my $material = $self->{model_object}->model->materials->{$new_volume->material_id};
$material->config->set_ifndef('extruder', 1);