mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
Hold every filament product to exactly one id, with no exceptions
filament_id is the plain mint of the product triple (filament_vendor, filament_type, filament name), and nothing else feeds it. The tooling used to accept any salt iteration of a preset's own triple, and its minting policy stepped past ids that other products held in the tree or in the snapshot, so which id a product got could depend on history. Every "salt split" in the tree masked a redundant preset rather than a real need, and no shipped id is salted, so salting goes entirely: no salt parameter, no id policy object, and --generate no longer reads the snapshot. --check now holds every declared and every inherited id to that one value and lists each preset that misses it, variants under a wrong root included, instead of folding them into the root's error. Two products whose triples mint one id is reported as a collision naming both, and --generate refuses to write it; the remedy is a rename so the triples differ. The Bambu catalog map generator keys its rows by the same mint rather than by what the tree already ships. No id changes: all 913 ids in the tree are already the mint of their triple, so --generate is a no-op and the snapshot is untouched.
This commit is contained in:
@@ -141,13 +141,10 @@ class SettingTree:
|
||||
return changed, errors, buf.getvalue()
|
||||
|
||||
def run_filament_ids(self, vendors=None, dry_run=False):
|
||||
"""The OTHER half of --generate, against this tree's own (absent)
|
||||
snapshot, so the id policy never consults the repo's real one."""
|
||||
"""The OTHER half of --generate."""
|
||||
buf = io.StringIO()
|
||||
with contextlib.redirect_stdout(buf):
|
||||
changed, errors = afi.generate_filament_ids(
|
||||
self.profiles, os.path.join(self.dir, "filament_id_snapshot.json"),
|
||||
vendors, dry_run)
|
||||
changed, errors = afi.generate_filament_ids(self.profiles, vendors, dry_run)
|
||||
return changed, errors, buf.getvalue()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user