Fix plugin settings lost on cloud metadata refresh

Cloud catalog records never carry [tool.orcaslicer.plugin.settings], so the
metadata merge wiped the locally-parsed settings and plugins silently ran on
their built-in defaults (ctx.params arrived empty).
This commit is contained in:
SoftFever
2026-07-17 02:09:34 +08:00
parent 0a0d59b76b
commit 1c9fda463b
4 changed files with 302 additions and 0 deletions

View File

@@ -157,6 +157,12 @@ inline void apply_plugin_metadata_fallbacks(PluginDescriptor& target, const Plug
target.entry_package = fallback.entry_package;
if (target.dependencies.empty())
target.dependencies = fallback.dependencies;
// [tool.orcaslicer.plugin.settings] lives only in the local package's PEP-723 header;
// cloud catalog records never carry it. Without this, every cloud-metadata merge wipes
// the parsed settings and plugins silently run on their built-in defaults (ctx.params
// arrives empty).
if (target.settings.empty())
target.settings = fallback.settings;
}
// Sanitize a value for use as a filesystem name and as a local plugin_key: