mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
Added the [scale] placeholder. #2791
This commit is contained in:
parent
00acd32120
commit
7d81aee62f
2 changed files with 7 additions and 0 deletions
|
@ -432,6 +432,11 @@ sub expanded_output_filepath {
|
||||||
$self->placeholder_parser->set(input_filename => $filename);
|
$self->placeholder_parser->set(input_filename => $filename);
|
||||||
$self->placeholder_parser->set(input_filename_base => $filename_base);
|
$self->placeholder_parser->set(input_filename_base => $filename_base);
|
||||||
|
|
||||||
|
# set other variables from model object
|
||||||
|
$self->placeholder_parser->set_multiple(
|
||||||
|
scale => [ map $_->model_object->instances->[0]->scaling_factor * 100 . "%", @{$self->objects} ],
|
||||||
|
);
|
||||||
|
|
||||||
if ($path && -d $path) {
|
if ($path && -d $path) {
|
||||||
# if output path is an existing directory, we take that and append
|
# if output path is an existing directory, we take that and append
|
||||||
# the specified filename format
|
# the specified filename format
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
void apply_config(DynamicPrintConfig *config)
|
void apply_config(DynamicPrintConfig *config)
|
||||||
%code%{ THIS->apply_config(*config); %};
|
%code%{ THIS->apply_config(*config); %};
|
||||||
void set(std::string key, std::string value);
|
void set(std::string key, std::string value);
|
||||||
|
void set_multiple(std::string key, std::vector<std::string> values)
|
||||||
|
%code%{ THIS->set(key, values); %};
|
||||||
|
|
||||||
void _single_set(std::string k, std::string v)
|
void _single_set(std::string k, std::string v)
|
||||||
%code%{ THIS->_single[k] = v; %};
|
%code%{ THIS->_single[k] = v; %};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue