Parse options from AMF metadata

This commit is contained in:
Alessandro Ranellucci 2013-12-30 19:00:32 +01:00
parent 07b9b12475
commit 4e76a9e4c9

View File

@ -97,6 +97,12 @@ sub end_element {
} elsif ($data->{LocalName} eq 'material') {
$self->{_material} = undef;
} elsif ($data->{LocalName} eq 'metadata' && $self->{_material}) {
if ($self->{_material_metadata_type} =~ /^slic3r\.(.+)/) {
my $opt_key = $1;
if (exists $Slic3r::Config::Options->{$opt_key}) {
$self->{_material}->set_deserialize($opt_key, $self->{_material}->attributes->{$opt_key});
}
}
$self->{_material_metadata_type} = undef;
} elsif ($data->{LocalName} eq 'constellation') {
$self->{_constellation} = undef;