From de0640603ae088faa749a687184c56853edbe8d8 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 18 Nov 2012 19:53:52 +0100 Subject: [PATCH] Append full config when --gcode-comments is enabled --- lib/Slic3r/Print.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 1b41ccdbf..69581697d 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -909,6 +909,16 @@ sub write_gcode { printf $fh "; filament used = %.1fmm (%.1fcm3)\n", $self->total_extrusion_length, $self->total_extrusion_volume; + if ($Slic3r::Config->gcode_comments) { + # append full config + print $fh "\n"; + foreach my $opt_key (sort keys %{$Slic3r::Config}) { + next if $Slic3r::Config::Options->{$opt_key}{shortcut}; + next if $Slic3r::Config::Options->{$opt_key}{gui_only}; + printf $fh "; %s = %s\n", $opt_key, $Slic3r::Config->serialize($opt_key); + } + } + # close our gcode file close $fh; }