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.
This commit is contained in:
bubnikv 2017-12-18 12:14:09 +01:00
parent bbfb9a4190
commit bb61de8379
5 changed files with 84 additions and 20 deletions

View file

@ -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) = @_;
@_ = ();