You've already forked etude_lego_jurassic_world
Filtre les couleurs ignorées et aligne les palettes
This commit is contained in:
@@ -9,6 +9,7 @@ from matplotlib.lines import Line2D
|
||||
|
||||
from lib.filesystem import ensure_parent_dir
|
||||
from lib.color_sort import lab_sort_key, sort_hex_colors_lab
|
||||
from lib.rebrickable.color_ignores import is_ignored_color_rgb
|
||||
from lib.rebrickable.parts_inventory import normalize_boolean
|
||||
from lib.rebrickable.stats import read_rows
|
||||
|
||||
@@ -30,6 +31,8 @@ def load_used_colors(parts_path: Path, colors_path: Path, minifig_only: bool = F
|
||||
colors_lookup = {(row["rgb"], normalize_boolean(row["is_trans"])): row["name"] for row in read_rows(colors_path)}
|
||||
totals: Dict[Tuple[str, str], int] = {}
|
||||
for row in rows:
|
||||
if is_ignored_color_rgb(row["color_rgb"]):
|
||||
continue
|
||||
if minifig_only and row.get("is_minifig_part") != "true":
|
||||
continue
|
||||
if not minifig_only and row.get("is_minifig_part") == "true":
|
||||
|
||||
Reference in New Issue
Block a user