Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-12-18 14:14:09 +0300
committerbubnikv <bubnikv@gmail.com>2017-12-18 14:14:09 +0300
commitbb61de83795b10f77107e81384b62405ba2bbc89 (patch)
tree6a03fede6e62dcdb112f37eeac092d789e9ade67 /lib
parentbbfb9a4190adea0a2864ecf3a98cb0ab9942035e (diff)
Fixed a regression error: The "current_extruder" identifier was not set
at the placeholder parser. Implemented a new PlaceholderParser::evaluate_boolean_expression() functionality to evaluate just a boolean expression using the full expressive power of the macro processing syntax. This function will now be used for deciding, which print or filament preset is compatible with which printer preset.
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm
index 22a6ee389..66039ddf0 100644
--- a/lib/Slic3r.pm
+++ b/lib/Slic3r.pm
@@ -80,6 +80,10 @@ my $paused = 0;
$Slic3r::loglevel = (defined($ENV{'SLIC3R_LOGLEVEL'}) && $ENV{'SLIC3R_LOGLEVEL'} =~ /^[1-9]/) ? $ENV{'SLIC3R_LOGLEVEL'} : 0;
set_logging_level($Slic3r::loglevel);
+# Let the palceholder parser evaluate one expression to initialize its local static macro_processor
+# class instance in a thread safe manner.
+Slic3r::GCode::PlaceholderParser->new->evaluate_boolean_expression('1==1');
+
sub spawn_thread {
my ($cb) = @_;
@_ = ();