mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 01:45:59 +08:00
change in Preset compatibility functions
This commit is contained in:
parent
e794ce4c1d
commit
ed8614945a
@ -341,11 +341,8 @@ std::string Preset::label() const
|
|||||||
|
|
||||||
bool is_compatible_with_print(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_print, const PresetWithVendorProfile &active_printer)
|
bool is_compatible_with_print(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_print, const PresetWithVendorProfile &active_printer)
|
||||||
{
|
{
|
||||||
// custom filament profiles are aviable for all prints
|
// common_profile vendor profiles should be decided as same vendor profiles
|
||||||
if (preset.preset.type == Preset::Type::TYPE_FILAMENT && preset.vendor != nullptr && preset.vendor != active_printer.vendor && preset.vendor->common_profile)
|
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor && !preset.vendor->common_profile)
|
||||||
return true;
|
|
||||||
|
|
||||||
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor)
|
|
||||||
// The current profile has a vendor assigned and it is different from the active print's vendor.
|
// The current profile has a vendor assigned and it is different from the active print's vendor.
|
||||||
return false;
|
return false;
|
||||||
auto &condition = preset.preset.compatible_prints_condition();
|
auto &condition = preset.preset.compatible_prints_condition();
|
||||||
@ -367,11 +364,8 @@ bool is_compatible_with_print(const PresetWithVendorProfile &preset, const Prese
|
|||||||
|
|
||||||
bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_printer, const DynamicPrintConfig *extra_config)
|
bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_printer, const DynamicPrintConfig *extra_config)
|
||||||
{
|
{
|
||||||
// custom filament profiles are aviable for all printers
|
// common_profile vendor profiles should be decided as same vendor profiles
|
||||||
if (preset.preset.type == Preset::Type::TYPE_FILAMENT && preset.vendor != nullptr && preset.vendor != active_printer.vendor && preset.vendor->common_profile)
|
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor && !preset.vendor->common_profile)
|
||||||
return true;
|
|
||||||
|
|
||||||
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor)
|
|
||||||
// The current profile has a vendor assigned and it is different from the active print's vendor.
|
// The current profile has a vendor assigned and it is different from the active print's vendor.
|
||||||
return false;
|
return false;
|
||||||
auto &condition = preset.preset.compatible_printers_condition();
|
auto &condition = preset.preset.compatible_printers_condition();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user