mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 10:05:59 +08:00
Label objects: rename Marlin -> Firmware-specific, updated tooltip
This commit is contained in:
parent
5d50a91c30
commit
395a5639cc
@ -112,13 +112,13 @@ namespace Slic3r {
|
||||
unique_id += instance_id;
|
||||
|
||||
std::string name = objects[object_id]->model_object()->name;
|
||||
if (label_object_style == LabelObjects::Marlin && objects[object_id]->model_object()->instances.size() > 1u)
|
||||
if (label_object_style == LabelObjects::Firmware && objects[object_id]->model_object()->instances.size() > 1u)
|
||||
name += " (copy " + std::to_string(instance_id) + ")";
|
||||
|
||||
std::string out;
|
||||
if (label_object_style == LabelObjects::Octoprint)
|
||||
out += std::string("; printing object ") + name + " id:" + std::to_string(object_id) + " copy " + std::to_string(instance_id) + "\n";
|
||||
else if (label_object_style == LabelObjects::Marlin) {
|
||||
else if (label_object_style == LabelObjects::Firmware) {
|
||||
out += std::string("M486 S") + std::to_string(unique_id) + "\n";
|
||||
out += std::string("M486 N") + name + "\n";
|
||||
}
|
||||
@ -131,7 +131,7 @@ namespace Slic3r {
|
||||
std::string out;
|
||||
if (label_object_style == LabelObjects::Octoprint)
|
||||
out += std::string("; stop printing object ") + name + " id:" + std::to_string(object_id) + " copy " + std::to_string(instance_id) + "\n";
|
||||
else if (label_object_style == LabelObjects::Marlin)
|
||||
else if (label_object_style == LabelObjects::Firmware)
|
||||
out += std::string("M486 S-1\n");
|
||||
return out;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(DraftShield)
|
||||
static const t_config_enum_values s_keys_map_LabelObjects = {
|
||||
{ "disabled", int(LabelObjects::Disabled) },
|
||||
{ "octoprint", int(LabelObjects::Octoprint) },
|
||||
{ "marlin", int(LabelObjects::Marlin) }
|
||||
{ "firmware", int(LabelObjects::Firmware) }
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(LabelObjects)
|
||||
|
||||
@ -1502,13 +1502,15 @@ void PrintConfigDef::init_fff_params()
|
||||
|
||||
def = this->add("gcode_label_objects", coEnum);
|
||||
def->label = L("Label objects");
|
||||
def->tooltip = L("Enable this to add comments into the G-Code labeling print moves with what object they belong to,"
|
||||
" which is useful for the Octoprint CancelObject plugin. This settings is NOT compatible with "
|
||||
"Single Extruder Multi Material setup and Wipe into Object / Wipe into Infill.");
|
||||
def->tooltip = L("Selects whether labels should be exported at object boundaries and in what format.\n"
|
||||
" Octoprint = comments to be consumed by Octoprint CancelObject plugin.\n"
|
||||
" Firmware = firmware specific G-code (it will be chosen based on firmware flavor and it can end up to be empty).\n\n"
|
||||
"This settings is NOT compatible with Single Extruder Multi Material setup and Wipe into Object / Wipe into Infill.");
|
||||
|
||||
def->set_enum<LabelObjects>({
|
||||
{ "disabled", L("Disabled") },
|
||||
{ "octoprint", L("OctoPrint comments") },
|
||||
{ "marlin", L("Marlin (M486)") }
|
||||
{ "firmware", L("Firmware-specific") }
|
||||
});
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<LabelObjects>(LabelObjects::Disabled));
|
||||
|
@ -148,7 +148,7 @@ enum DraftShield {
|
||||
};
|
||||
|
||||
enum class LabelObjects {
|
||||
Disabled, Octoprint, Marlin
|
||||
Disabled, Octoprint, Firmware
|
||||
};
|
||||
|
||||
enum class PerimeterGeneratorType
|
||||
|
Loading…
x
Reference in New Issue
Block a user