mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Translate Model class' storage to C++.
Some code copied from xs-model branch.
Also:
* Generate ::Ref classes programatically.
* Add separate __REGISTER_CLASS macro
(for use where forward declaration won't work, i.e. typedefs)
This commit is contained in:
parent
c72dc13d7e
commit
05b2993769
20 changed files with 1048 additions and 218 deletions
|
|
@ -35,8 +35,8 @@ sub write_file {
|
|||
printf $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
|
||||
printf $fh qq{<amf unit="millimeter">\n};
|
||||
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};
|
||||
for my $material_id (sort @{ $model->material_names }) {
|
||||
my $material = $model->get_material($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->{$_};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue