1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-14 08:34:26 +00:00

Expose all SLIC3R_* environment variables as placeholders. #781

This commit is contained in:
Alessandro Ranellucci
2012-11-16 10:07:30 +01:00
parent 580e36eb25
commit a5a0f32e19
+5 -3
View File
@@ -1156,9 +1156,11 @@ sub replace_options {
my $self = shift;
my ($string, $more_variables) = @_;
if ($more_variables) {
my $variables = join '|', keys %$more_variables;
$string =~ s/\[($variables)\]/$more_variables->{$1}/eg;
$more_variables ||= {};
$more_variables->{$_} = $ENV{$_} for grep /^SLIC3R_/, keys %ENV;
{
my $variables_regex = join '|', keys %$more_variables;
$string =~ s/\[($variables_regex)\]/$more_variables->{$1}/eg;
}
my @lt = localtime; $lt[5] += 1900; $lt[4] += 1;