Bugfix: AMF files with no materials were not successfully parsed

degen-loop-screen
Alessandro Ranellucci 2012-02-26 16:22:45 +01:00
parent 79bc2240fb
commit b9f30d8378
1 changed files with 1 additions and 1 deletions

View File

@ -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