mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 03:26:00 +08:00
Convert filament_settings_id to something that can be set instead of just read from a configuration file.
This commit is contained in:
parent
8c52045b14
commit
d9c1d459c5
@ -1046,6 +1046,7 @@ sub build {
|
|||||||
my $optgroup = $page->new_optgroup('Optional information');
|
my $optgroup = $page->new_optgroup('Optional information');
|
||||||
$optgroup->append_single_option_line('filament_density', 0);
|
$optgroup->append_single_option_line('filament_density', 0);
|
||||||
$optgroup->append_single_option_line('filament_cost', 0);
|
$optgroup->append_single_option_line('filament_cost', 0);
|
||||||
|
$optgroup->append_single_option_line('filament_settings_id', 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,8 +447,15 @@ PrintConfigDef::PrintConfigDef()
|
|||||||
def->default_value = opt;
|
def->default_value = opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
def = this->add("filament_settings_id", coString);
|
def = this->add("filament_settings_id", coStrings);
|
||||||
def->default_value = new ConfigOptionString("");
|
def->label = __TRANS("Custom GCode ID");
|
||||||
|
def->tooltip = __TRANS("Identifer for this filament. Used to mark specific filament profiles for custom gcode.");
|
||||||
|
def->cli = "filament-settings-id=s@";
|
||||||
|
{
|
||||||
|
ConfigOptionStrings* opt = new ConfigOptionStrings();
|
||||||
|
opt->values.push_back("");
|
||||||
|
def->default_value = opt;
|
||||||
|
}
|
||||||
|
|
||||||
def = this->add("fill_angle", coFloat);
|
def = this->add("fill_angle", coFloat);
|
||||||
def->label = __TRANS("Fill angle");
|
def->label = __TRANS("Fill angle");
|
||||||
|
@ -336,6 +336,7 @@ class GCodeConfig : public virtual StaticPrintConfig
|
|||||||
ConfigOptionFloats filament_cost;
|
ConfigOptionFloats filament_cost;
|
||||||
ConfigOptionFloats filament_max_volumetric_speed;
|
ConfigOptionFloats filament_max_volumetric_speed;
|
||||||
ConfigOptionStrings filament_notes;
|
ConfigOptionStrings filament_notes;
|
||||||
|
ConfigOptionStrings filament_settings_id;
|
||||||
ConfigOptionBool gcode_comments;
|
ConfigOptionBool gcode_comments;
|
||||||
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
|
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
|
||||||
ConfigOptionBool label_printed_objects;
|
ConfigOptionBool label_printed_objects;
|
||||||
@ -380,6 +381,7 @@ class GCodeConfig : public virtual StaticPrintConfig
|
|||||||
OPT_PTR(filament_cost);
|
OPT_PTR(filament_cost);
|
||||||
OPT_PTR(filament_max_volumetric_speed);
|
OPT_PTR(filament_max_volumetric_speed);
|
||||||
OPT_PTR(filament_notes);
|
OPT_PTR(filament_notes);
|
||||||
|
OPT_PTR(filament_settings_id);
|
||||||
OPT_PTR(gcode_comments);
|
OPT_PTR(gcode_comments);
|
||||||
OPT_PTR(gcode_flavor);
|
OPT_PTR(gcode_flavor);
|
||||||
OPT_PTR(label_printed_objects);
|
OPT_PTR(label_printed_objects);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user