mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 05:54:03 -06:00
Large refactoring to allow processing multimaterial files
This commit is contained in:
parent
04be94023b
commit
02356fd613
13 changed files with 982 additions and 891 deletions
|
@ -35,8 +35,8 @@ sub write_file {
|
|||
for my $material_id (sort keys %{ $model->materials }) {
|
||||
my $material = $model->materials->{$material_id};
|
||||
printf $fh qq{ <material id="%d">\n}, $material_id;
|
||||
for (keys %$material) {
|
||||
printf $fh qq{ <metadata type=\"%s\">%s</metadata>\n}, $_, $material->{$_};
|
||||
for (keys %{$material->attributes}) {
|
||||
printf $fh qq{ <metadata type=\"%s\">%s</metadata>\n}, $_, $material->attributes->{$_};
|
||||
}
|
||||
printf $fh qq{ </material>\n};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue