mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-08 17:57:44 +00:00
Content-address Bambu filament ids and check profiles against the catalog map
Every vendor's filament_id declarations, Bambu's own bundle included, are now minted and checked the same way: the GF* catalog space is reserved but ownerless, format is validated unconditionally with no snapshot or BBL exemption, and both --remint and the default assign pass treat a non-OF declaration as one needing a fresh mint (so a future BambuStudio sync self-heals instead of needing a manual pass). A new check validates resources/printers/bambu_filament_ids.json against the tree it describes: that it parses, carries its header, keys only OF ids, maps each Bambu id once, and agrees with the tree on every product it shares. The redundant BBL/OFL carve-out in the profile checker's length check is dropped too, so it runs the same way for every vendor. The BBL bundle itself hasn't been touched yet and still declares its old GF ids, so TestRealTree.test_shipped_snapshot_matches_tree is expected to fail here (209 declarations flagged) until the next commit re-mints the bundle onto OF ids.
This commit is contained in:
@@ -290,19 +290,14 @@ def check_name_consistency(profiles_dir, vendor_name):
|
||||
|
||||
return error_count, 0
|
||||
|
||||
def check_filament_id(vendor, vendor_folder):
|
||||
def check_filament_id(vendor_folder):
|
||||
"""
|
||||
Make sure filament_id is not longer than 8 characters, otherwise AMS won't work properly
|
||||
Make sure filament_id is not longer than 8 characters, otherwise AMS won't work properly.
|
||||
|
||||
NOTE: superseded by check_filament_ids (assign_filament_ids.py) for non-BBL/OFL
|
||||
vendors, which validates format/uniqueness/structure tree-wide against the
|
||||
grandfather snapshot. This length check stays scoped to BBL/OFL because other
|
||||
vendors ship grandfathered >8-char ids (e.g. Prusa's 36-char name-ids), so it
|
||||
cannot simply go tree-wide.
|
||||
Runs tree-wide, every vendor alike: check_filament_ids (assign_filament_ids.py)
|
||||
already requires every id in the tree to match the fixed-length "OF" format,
|
||||
so this is a redundant belt-and-suspenders check, not a substitute for it.
|
||||
"""
|
||||
if vendor not in ('BBL', 'OrcaFilamentLibrary'):
|
||||
return 0
|
||||
|
||||
error = 0
|
||||
vendor_path = Path(vendor_folder)
|
||||
if not vendor_path.exists():
|
||||
@@ -602,7 +597,7 @@ def main():
|
||||
|
||||
errors_found += check_vector_type_keys(profiles_dir, vendor_name)
|
||||
|
||||
errors_found += check_filament_id(vendor_name, vendor_path / "filament")
|
||||
errors_found += check_filament_id(vendor_path / "filament")
|
||||
checked_vendor_count += 1
|
||||
|
||||
if args.vendor:
|
||||
|
||||
Reference in New Issue
Block a user