mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 21:44:08 -06:00
Write material config to AMF files. Remove the old Materials tab. Update custom settings when a part is selected
This commit is contained in:
parent
691db31da0
commit
878deb8183
3 changed files with 6 additions and 86 deletions
|
@ -37,10 +37,14 @@ sub write_file {
|
|||
printf $fh qq{ <metadata type="cad">Slic3r %s</metadata>\n}, $Slic3r::VERSION;
|
||||
for my $material_id (sort keys %{ $model->materials }) {
|
||||
my $material = $model->materials->{$material_id};
|
||||
printf $fh qq{ <material id="%d">\n}, $material_id;
|
||||
printf $fh qq{ <material id="%s">\n}, $material_id;
|
||||
for (keys %{$material->attributes}) {
|
||||
printf $fh qq{ <metadata type=\"%s\">%s</metadata>\n}, $_, $material->attributes->{$_};
|
||||
}
|
||||
my $config = $material->config;
|
||||
foreach my $opt_key (@{$config->get_keys}) {
|
||||
printf $fh qq{ <metadata type=\"slic3r.%s\">%s</metadata>\n}, $opt_key, $config->serialize($opt_key);
|
||||
}
|
||||
printf $fh qq{ </material>\n};
|
||||
}
|
||||
my $instances = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue