ani
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user