This commit is contained in:
Nicholas Butzke
2026-08-09 01:31:44 -04:00
parent 922983429e
commit 9358746582
43 changed files with 4324 additions and 481 deletions
+11 -3
View File
@@ -241,13 +241,21 @@ if _roles:
# ------------------------------------------------------------------- skeleton
def is_rootish(b):
return b is None or any(t in b.name.lower()
for t in ("root", "master", "armature"))
if b is None:
return True
# Some production rigs call their weighted pelvis simply ``root``. The
# role sidecar is the anatomical authority; treating that pelvis as a
# disposable scene root falsely reports every attached limb as orphaned.
if b.name == SIDECAR_INFO.get("roles", {}).get("hips"):
return False
return any(t in b.name.lower() for t in ("root", "master", "armature"))
orphans = [b.name for b in arm.data.bones
if is_rootish(b.parent) and not is_rootish(b)]
check(len(orphans) <= 1, "every chain is attached to the body",
root_names = {bone.name for bone in arm.data.bones}
root_allowance = 2 if {"全ての親", "操作中心"}.issubset(root_names) else 1
check(len(orphans) <= root_allowance, "every chain is attached to the body",
f"{len(orphans)} bones still on the armature root: {orphans[:6]}")
# ----------------------------------------------------------------------- clips