diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2012-02-26 19:22:45 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2012-02-26 19:22:45 +0400 |
commit | b9f30d8378ed88dbeb7415ae99c593ff346f00d2 (patch) | |
tree | 7dbb976742c4cc7f0243d0da00f87c1adf03d077 | |
parent | 79bc2240fb332206288d54865f81bb42f15fbb5f (diff) |
Bugfix: AMF files with no materials were not successfully parsed
-rw-r--r-- | lib/Slic3r/Format/AMF/Parser.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Slic3r/Format/AMF/Parser.pm b/lib/Slic3r/Format/AMF/Parser.pm index edac0929d..b6c7dbefc 100644 --- a/lib/Slic3r/Format/AMF/Parser.pm +++ b/lib/Slic3r/Format/AMF/Parser.pm @@ -24,7 +24,7 @@ sub start_element { } elsif ($self->{_vertex} && $data->{LocalName} =~ /^[xyz]$/ && $self->{_tree}[-1] eq 'coordinates') { $self->{_coordinate} = $data->{LocalName}; } elsif ($data->{LocalName} eq 'volume') { - $self->{_volume_materialid} = $self->_get_attribute($data, 'materialid'); + $self->{_volume_materialid} = $self->_get_attribute($data, 'materialid') || '_'; $self->{_volume} = []; } elsif ($data->{LocalName} eq 'triangle') { $self->{_triangle} = [[], "", "", ""]; # empty normal |