Fixed regression causing [input_filename] and [input_filename_base] not being available in custom G-code anymore. Includes regression test. #1507

This commit is contained in:
Alessandro Ranellucci 2015-02-15 23:41:36 +01:00
parent c0f453f83e
commit a07c48bb30
2 changed files with 14 additions and 6 deletions

View file

@ -428,10 +428,10 @@ sub expanded_output_filepath {
my $filename = my $filename_base = basename($input_file);
$filename_base =~ s/\.[^.]+$//; # without suffix
my $extra = {
input_filename => $filename,
input_filename_base => $filename_base,
};
# set filename in placeholder parser so that it's available also in custom G-code
$self->placeholder_parser->set(input_filename => $filename);
$self->placeholder_parser->set(input_filename_base => $filename_base);
if ($path && -d $path) {
# if output path is an existing directory, we take that and append
@ -447,7 +447,7 @@ sub expanded_output_filepath {
# make sure we use an up-to-date timestamp
$self->placeholder_parser->update_timestamp;
return $self->placeholder_parser->process($path, $extra);
return $self->placeholder_parser->process($path);
}
# This method assigns extruders to the volumes having a material